How to enable backup and restore for Symbian OS applications
Applications will not be backed up by default in S60 3rd Edition. Enabling backup will make your application more user-friendly: a user which do a backup of this phone (ok, those one are probably a minority...) expects that all its application are backed up, not all application but yours. So, let's try to make the user happy. In most of the case , this is quite easy....
Another good reason to make your application aware of backup is that this is a Symbian Signed requirement. This is not a mandatory one but if your application is not backup aware, you will have to notify the Test House or they may consider that backup has failed. Once again, in most of the case, supporting backup is ridiculously simple.
Basic application backup
The following represent the minimum you have to do for the backup of your application (this means: executable and resource files, no data file will be backed up):
write a backup_registration.xml file as shown below
<backup_registration>
<system_backup />
<restore requires_reboot="no" />
</backup_registration>
add it into your pkg file:
"backup_registration.xml"-"!:\private\<your SID>\backup_registration.xml"
Adding private data into the backup
Another common requirement would be to save the content of your private directory (located in \private\<your SID>). This is done by adding the following declaration in your backup_registration.xml file (inside the <backup_registration> tags):
<include_directory name="\" />
</passive_backup>
You can also decide to save all your private directory but a 'nobackup' subdirectory:
<include_directory name="\">
<exclude name = "\nobackup\"/>
</include_directory>
</passive_backup>
You may also prefer to specify files instead of directories:
<include_file name="me_too.dat" />
Adding public data into the backup
In the paragraph above, the "\" directory is referring to your application private directory. So how to save data when they are located outside of your private area ? This is done by simply using another xml tag. Replace <passive_backup> by <public_backup> and the path will be relative to the root directory of the phone file system (you don't need to specify the drive):
<include_directory name="C:\MyData" />
</public_backup>
Known Bugs
Unfortunately, several bugs affects the Backup and Restore feature. Some of these includes:
data located in C:\System cannot be backed-up: no work-around except put your data in another location....
Backup and restore fails for applications using a developer certificate. That one is just terrible: you can test backup and restore for application only when they are signed with a self- generated certificate or once they are Symbian Signed. If you use developer certificate, which is not so extravagant, no luck: your application will be backed-up correctly but restore will always fail.
I have stopped counting how many hours I have lost before finding out this second issue! And will you believe it, I just spent half of my afternoon trying to backup an application signed with a developer certificate which had its data under c:\system.... Sometimes I hate this operating system!
Further readings
The PC connectivity: how to write backup-aware software paper from Symbian Ltd is a must-read if you need to setup complex backup scheme for your application as well as the How to troubleshoot backup/restore entry in the UIQ Developer FAQ.






How to enable backup and restore for Symbian OS applications
Thanks for this info. You saved me from doing same error/try with your tips.
I am giving up. For next project we will outsource development.
How to enable backup and restore for Symbian OS applications
Re: How to enable backup and restore for Symbian OS applications
Eric,
Does the "data located in C:\System cannot be backed-up" still has no known workarounds?
Re: How to enable backup and restore for Symbian OS applications
Hey thanks for saving a lot of time. The info regarding the Dev signed Apps not bieng restored was useful