Product Version: 6.0
Last Modified: 31 Dec 2015
How to set up automated copying of a Backup Repository?
Starting from version 6.0, you can use backup copy job to copy your backups.
In older versions, Backup Repository copying can be automated using Pre and Post Job scripts in conjunction with product Command Line Interface.
In the below example we will describe how to copy a backup repository to USB drive in case the product is installed on Windows.
- Use command line interface to find out the Repository ID for your backup repository.
The --repository-list command should be executed for this purpose.
- Create the pre and post job scripts:
- Place the pre and post job scripts into the bin folder in the product installation folder.
- Configure your backup job to run the above-mentioned pre and post job scripts.
The job must be set to wait for the pre job script to complete and should fail if the script fails.
- Run your backup job on demand or on schedule.
The scripts will trigger copying of the entire repository content after each job run.
NOTE: Backup repository must be detached while copying the contents.
NOTE: You can use the same approach to copy the backup repository to a shared folder at another server.
Below you can find Windows script examples that copy the backup repository using Robocopy tool.
For Linux-based NAKIVO Backup & Replication deployments, we recommend to use Rsync utility.
In the current example we assume that:
- Backup repository it is located in the root of C: drive.
In this case the backups will be located in “C:\NakivoBackup” folder.
- The ID of the backup repository is “1”.
- The secondary location is USB drive F: