Editing Documentation/Maemo 5 Developer Guide/Using Generic Platform Components/Using Backup Application
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | The back-up application saves and restores user data stored in | + | = Usage of Back-up Application = |
+ | |||
+ | The back-up application saves and restores user data stored in /MyDocs (by default) and setting directories/files /etc/osso-af-init/gconf-dir (a link to GConf database /var/lib/gconf), /etc/osso-af-init/locale, and /etc/bluetooth/name. It can be configured to back up other locations and files as well, by custom configuration files. | ||
The back-up application must not be disrupted by other applications writing or reading during a back-up or restore operation. | The back-up application must not be disrupted by other applications writing or reading during a back-up or restore operation. | ||
Line 5: | Line 7: | ||
For restore process, back-up therefore will, if the user approves, ask the application killer to close all applications, and then wait until it has been done. | For restore process, back-up therefore will, if the user approves, ask the application killer to close all applications, and then wait until it has been done. | ||
- | For backing up, the | + | For backing up, the backup_start and backup_finish D-BUS signals will be emitted on the session bus, indicating to applications that they should not write to disk. |
- | == D- | + | === D-BUS description and methods of back-up application === |
- | + | Service com.nokia.backup | |
- | + | Interfaces com.nokia.backup | |
- | + | Object Paths /com/nokia/backup | |
- | + | ||
- | + | ||
- | + | ||
- | + | Method: cancel | |
- | + | ||
- | : | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | Name cancel | |
- | + | Parameters none | |
- | : activate | + | Returns Empty reply |
- | + | Description Cancels any ongoing back-up or restore operation | |
- | + | ||
- | + | Method: activate | |
- | + | ||
- | + | Name activate | |
- | + | Parameters none | |
+ | Returns Empty reply | ||
+ | Description Used to activate the application with auto-activation | ||
== Custom back-up locations == | == Custom back-up locations == | ||
Line 42: | Line 35: | ||
The "locations" configuration lets applications install a configuration file with a list of files and directories that should be included in the back-up, or explicitly excluded from it. | The "locations" configuration lets applications install a configuration file with a list of files and directories that should be included in the back-up, or explicitly excluded from it. | ||
- | The files should be installed into | + | The files should be installed into /etc/osso-backup/applications, named <application>.conf and consist of simple XML format. An example of the format can be found in [https://vcs.maemo.org/svn/maemoexamples/tags/maemo_5.0/maemo-examples/example_libosso.conf example_libosso.conf] in the maemo-examples module: |
- | < | + | <tt><span>'''<span><font color="#0000FF"><backup-configuration></font></span>'''</span> |
- | + | <span>'''<span><font color="#0000FF"><locations></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"><location</font></span>'''</span> <span><font color="#009900">type</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"file"</font></span> | |
- | + | <span><font color="#009900">category</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"settings"</font></span> <span><font color="#009900">auto</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"true"</font></span><span>'''<span><font color="#0000FF">></font></span>'''</span>/etc/example.ini<span>'''<span><font color="#0000FF"></location></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"><location</font></span>'''</span> <span><font color="#009900">type</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"dir"</font></span> | |
- | + | <span><font color="#009900">category</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"documents"</font></span><span>'''<span><font color="#0000FF">></font></span>'''</span>/home/user/foo<span>'''<span><font color="#0000FF"></location></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"><exclusion</font></span>'''</span> <span><font color="#009900">type</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"file"</font></span> | |
- | + | <span><font color="#009900">category</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"settings"</font></span><span>'''<span><font color="#0000FF">></font></span>'''</span>/home/user/bigfile<span>'''<span><font color="#0000FF"></exclusion></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"><exclusion</font></span>'''</span> <span><font color="#009900">type</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"file"</font></span> | |
- | + | <span><font color="#009900">category</font></span><span><font color="#990000"><nowiki>=</nowiki></font></span><span><font color="#FF0000">"settings"</font></span><span>'''<span><font color="#0000FF">></font></span>'''</span>/tmp/*.jpg<span>'''<span><font color="#0000FF"></exclusion></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"></locations></font></span>'''</span> | |
- | + | <span>'''<span><font color="#0000FF"></backup-configuration></font></span>'''</span></tt> | |
- | </backup-configuration> | + | |
- | </ | + | |
We use the <location> tag to identify files or directories to be backed up. The path must be absolute. The <exclusion> tag can be used to exclude some files from the backup, such as temporary files, cached files, or settings for older versions of a software package. Wild cards '?' and '*' are also supported. | We use the <location> tag to identify files or directories to be backed up. The path must be absolute. The <exclusion> tag can be used to exclude some files from the backup, such as temporary files, cached files, or settings for older versions of a software package. Wild cards '?' and '*' are also supported. | ||
Line 69: | Line 60: | ||
'''CATEGORY''' is used for handling selective back-up and restore. It may be omitted, in which case the location will only be backed up when backing up or restoring everything. The value can be: | '''CATEGORY''' is used for handling selective back-up and restore. It may be omitted, in which case the location will only be backed up when backing up or restoring everything. The value can be: | ||
- | * | + | * comm_and_cal - for communication and calendar |
- | * | + | * settings - for system settings |
- | * | + | * bookmarks - for bookmark |
- | * | + | * applications - for 3rd apps list |
'''AUTO''' can be true or false. In case of a conflict during backup, the destination file will be automatically replaced if this argument is true. Otherwise, the user will be prompted. This argument is only used for files, and defaults to false if omitted. | '''AUTO''' can be true or false. In case of a conflict during backup, the destination file will be automatically replaced if this argument is true. Otherwise, the user will be prompted. This argument is only used for files, and defaults to false if omitted. | ||
Line 80: | Line 71: | ||
The back-up application makes it possible to execute scripts after a restore operation. There are two kinds of scripts. First, there can be scripts that are executed after every restore operation. Then there are also scripts that are executed only, if the restore is made from a back-up created in an earlier product. | The back-up application makes it possible to execute scripts after a restore operation. There are two kinds of scripts. First, there can be scripts that are executed after every restore operation. Then there are also scripts that are executed only, if the restore is made from a back-up created in an earlier product. | ||
- | For the scripts that are used to transform data between the device software versions, the location for applications to install the scripts is /etc/osso-backup/restore.d/<dir>, where <dir> is a subdirectory for each transition between two different consecutive version of the platform. For transforming between IT-2006 and IT-2007 versions, the directory is <br />/etc/osso-backup/restore.d/it2007/. For scripts that are executed after every restore, the location is | + | For the scripts that are used to transform data between the device software versions, the location for applications to install the scripts is /etc/osso-backup/restore.d/<dir>, where <dir> is a subdirectory for each transition between two different consecutive version of the platform. For transforming between IT-2006 and IT-2007 versions, the directory is <br />/etc/osso-backup/restore.d/it2007/. For scripts that are executed after every restore, the location is /etc/osso-backup/restore.d/always. |
The files installed here should have the executable bit set. Any files ending with "<code>~</code>" or ".bak" are ignored, just like directories or files starting with a dot ("."). | The files installed here should have the executable bit set. Any files ending with "<code>~</code>" or ".bak" are ignored, just like directories or files starting with a dot ("."). | ||
Line 101: | Line 92: | ||
* You may want to consider erasing the cached inbox contents before doing backup if your email inbox is very large. E.g. if your mail contains a lot of attachments, the cache may be in the size of 100's of megabytes. To erase the cache and prevent its backup open an xterm and do: | * You may want to consider erasing the cached inbox contents before doing backup if your email inbox is very large. E.g. if your mail contains a lot of attachments, the cache may be in the size of 100's of megabytes. To erase the cache and prevent its backup open an xterm and do: | ||
- | + | \rm ./cache/mail/imap/foo.bar__imap.gmail.com_993/folders/INBOX/*.~ | |
- | where | + | where foo.bar* is the name of the imap account. The size of your email may be determined by: |
- | + | cd .modest | |
- | + | du -k | |
[[Category:Development]] | [[Category:Development]] | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Fremantle]] | [[Category:Fremantle]] |
Learn more about Contributing to the wiki.