Enabling and Using Selective Copy for Live Sync
By default, Live Sync uses any existing backup history for a virtual machine to create a destination virtual machine.
When copying backup data to a remote site where Live Sync operations will be performed, you can configure Commvault to copy only the latest full or synthetic full backup and any subsequent incremental backups to the remote site. This solution can be used to move backup data from the primary site (either streaming backups or backup copies) to a remote site using an auxiliary copy operation.
When Live Sync is configured to start immediately after backup, the default behavior is to start the Live Sync operation when the primary backup is complete. Perform the steps below to start Live Sync only after an auxiliary copy operation is completed.
Before You Begin
- Identify the MediaAgent that will manage backup data at the remote site.
- This procedure assumes that one or more full or synthetic full backups and incremental backups have been run for virtual machines covered by the storage policy that is used for the auxiliary copy or backup copy operations.
- Create a selective copy for the virtual machines that will be used for Live Sync:
- From the CommCell Browser, expand Policies > Storage Policies.
- Right-click the storage policy that is used for the source VMs that will be replicated, and then select All Tasks > Create New Copy.
- In the Copy Properties dialog box, on the General tab:
- Enter the copy name.
- Select the Selective Copy check box.
- Under Default Destination, select the library and MediaAgent for the remote site.
- Click the Associations tab and select the virtual machines to be covered by the selective copy operation.
- Click the Selective Copy tab and select Do not Automatically select jobs.
- Click the Copy Policy tab, clear the All Backups check box, and click the down arrow to select a date for the Backups On and After value.
Backups that occur on or after the specified date will be included in the selective copy operation that copies backup data from the primary copy to the secondary copy.
- Click OK.
- Log in to the CommServe host using qlogin.
- Run the following scripts, including single quotes (') around parameter values:
qoperation execscript -sn SelectAdditionalJobs -si @i_SPName = 'storage_policy_name' -si @i_CopyName = 'selective_copy_name' -si @i_BackupTypes = 'n'
qoperation execscript -sn DisablePreviousJobsOnNewFull -si @i_SPName = 'storage_policy_name' -si @i_CopyName='selective_copy_name' -si @i_Set = '1'
Where storage_policy_name is the name of the storage policy associated with the source VMs, selective_copy_name is the name of the selective copy for the storage policy, and the @i_BackupTypes value (n) is the backup type:
- 0 – Only full backups
- 1 – Full and differential backups
- 2 – All types of backups
- Complete the auxiliary copy operation for all pending backup jobs:
- Right-click the storage policy and select All Tasks > Run Auxiliary Copy.
- In the Auxiliary Copy Job Options dialog box, on the General tab:
- Select the Select a Copy option and choose the selective copy from the list.
- Select the Use Most Recent Full Backup for Auxcopy check box.
- Click OK.
- Change the copy precedence of the Live Sync schedule to the corresponding auxiliary copy or backup copy for the storage policy.
Based on the specified copy precedence, Live Sync will run after the corresponding primary backup, auxiliary copy, or backup copy operation completes.