You Are Here:

Community: Wiki

This page was last modified on 19 February 2009, at 19:07.

TSS000750 - Enabling backup and restore for installed C++ applications

From Forum Nokia Wiki



ID TSS000750 Creation date September 17, 2007
Platform S60 3rd Edition Devices
Category Symbian C++ Subcategory Base/System


Keywords (APIs, classes, methods, functions):

Overview

In S60 3rd Edition, installed applications will not be backed up by default. 3rd party application developers need to enable backup and restore for their applications by including a backup_registration.xml file in the application's private directory.


Solution

A backup registration file typically includes the following information:

  1. For passive data backup operations, a list of private directories and files that should be backed up. It is possible to list a directory for backup and then list subdirectories or files that should be excluded. These directories and files are defined relative to the process private area, so it is not possible to refer to private files owned by another process (a single backslash denotes the whole private directory). If some files or directories do not exist, no error will be raised; that is, it is acceptable to list directories which do not exist yet. If an incremental backup is inefficient for the data, it is possible to specify that only base backups should be done. For example, if the data owner stores all data in one database file, an increment will always be the whole database file. In this case it is more efficient to always do a base backup or the restore involves transferring large amounts of redundant data.
  2. A list of public files and directories to be backed up as part of a partial backup. The same syntax is used as for private files but with regard to the public part of the filing system. Any system or private files are ignored from this section (because they are not public files). As with files listed for passive backup, the list can include directories that do not yet exist.


The following is an example of a backup registration file for a data owner that requires passive backup of all its files and system files ( \private\<UID>\):


   <?xml version="1.0" standalone="yes"?> 
   <backup_registration> 
     <passive_backup> 
       <include_directory name = "\" /> 
     </passive_backup> 
     <system_backup/> 
     <restore requires_reboot = "no"/> 
   </backup_registration> 


The above code can be used as a default template for applications that store files only under the \private directory structure.

If an application wants to store data which is accessed by another application, the data should be stored in the C:\Data directory. This directory will be automatically backed up and doesn't need to be defined in the backup registration file. However, if the application wants to backup other public directories, they should be defined using the <public_backup> tag.

For example, the following registration file defines two additional public directories that need to be backed up:


   <?xml version="1.0" standalone="yes" ?>
   <backup_registration>
     <passive_backup>
       <include_directory name="\" />
     </passive_backup>
     <public_backup>
       <include_directory name="c:\cities\" />
       <include_directory name="e:\cities\" />
     </public_backup>
     <system_backup />
     <restore requires_reboot="no" />
   </backup_registration>


Active backup

If the application requires more control over the files that are backed up and restored, it can register for active backup. The secure backup engine will start any process registered for active backup, if it's not already running. It is the application's responsibility to react to backup and restore events, and actively provide its private data to or receive it from the secure backup engine.


For more information, see:

How To Write Backup Aware Software for Symbian OS v9 by Symbian

KIS000544 - Backup and restore fails for applications using a developer certificate

Related articles

TSS001073 - Backup of add-on DLLs

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fTSS000709E5fE2dE5fManagingE5fVoIPE5fprofilesX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxTSS000709E20E2dE20ManagingE20VoIPE20profilesE20E2dE20ForumE20NokiaE20WikiX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2fX qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZupdatedQDx2008E2d10E2d02X qfnZuserE5ftagQSxpluginX qmarsZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ