This section describes the recommended conn::CSBEClient function calls for a partial and incremental backup.
A partial backup backs up the data of specified data owners. Application developers provide a full list of data owners in the backup and restore registration file. To back up a subset of the list, the Security IDs (SIDs) of the specified data owners must be passed to the Backup Engine.
An incremental backup backs up files that are new or modified since the last backup. After each incremental backup, a snapshot, which saves a list of file names and details of each data owner, is saved. Before each incremental backup, the previously saved snapshots must be provided to the Backup Engine.
The user application must instantiate conn::CSBEClient to connect to the Backup Engine.
Get a list of registered data owners from the Backup Engine.
The Backup Engine parses the backup registration files to return an array of CDataOwnerInfo objects. A CDataOwnerInfo object encapsulates all the information regarding a particular data owner on the phone, such as packages that the data owners belong to and data types (public data or private data). These objects can be internalized and externalized to create backup archives.
Send a list of data owners to the Backup Engine.
To back up the data of specified data owners, pass the array of the Secure IDs (SID) of these data owners to the Backup Engine.
Note: Each Symbian process is identified by its SID.
Set the Backup Engine to the backup mode which signals the start of a backup.
The Backup Engine publishes the mode to the subscribed data owners. This gives the data owners some time to prepare for the backup, for example they can release resources in case of file lock or data conflict.
The mode contains the backup types: full or partial, base or incremental.
Request the state of active data owners from the Backup Engine.
This step ensures that the data owners are ready to supply data in the following steps, for example file locks are released.
Supply data snapshots got from the host PC to the Backup Engine.
Before doing an incremental backup, the Backup Engine needs to know a list of the files included in the preceding backup. Refer to step 13 for saving snapshots after an incremental backup.
A snapshot transfer type must be passed to the function above. For more information about creating snapshot transfer types, refer to the Creating transfer types section.
Inform the Backup Engine that all snapshots have been supplied and it is ready to do the backup.
Request the size of the data to be backed up from the Backup Engine.
The file size information can be sent to the PC to track the backup progress.
Get a list of public files to be backed up from the Backup Engine.
The file list can be sent to the PC to track backup progress.
iBackupClient->PublicFileListL( TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, RFileArray& aFiles );
The Backup Engine can get a list of public files, but it does not supply public files directly to the backup server. Device creators must copy the public files from the device and supply them to the host PC in their backup server implementations.
Request the system data from the Backup Engine for backup.
Note: Refer to the Creating transfer types section for an example of creating the required CSBGenericTransferType.
Request active private data from the backup Engine for backup.
Request passive private data from the backup Engine for backup.
Request the snapshots of all data owners. The backup server can then send the snapshots to the host PC for backup.
After an incremental backup, conn::CSBEClient must request snapshots from the Backup Engine. The backup server sends the snapshots to the host PC and the host PC saves the information.
Set the Backup Engine into the normal mode.
After the data is backed up on the PC, set the Backup Engine to the normal mode. The subscribed data owners respond to the signal and resume the state before the backup. For example, resume file locks or a GUI application recovers to the state and view prior to the backup.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.