Backup and Restore is currently available as a preview feature. You must enable this feature in the application properties file to use it.
This preview version can only be used through the REST API.
LiveData Migrator allows you to backup all of your configured migrations, exclusions and settings through the CLI. Restore this backup at any time to revert your LiveData Migrator instance to its prior state. This will not undo file transfers that have already been completed.
The backup will save:
- Source configuration
- Path mappings
- Bandwidth Policy
- Secure keys for accessing filesystems*
* These are masked by default, unless the
mask=false property is supplied in the backup request.
By default, created backups are stored in
The backup and restore feature makes use of a REST API to send backup and restore requests. Below are some examples using curl commands.
Use the following command to write a backup to a file on the host machine:
curl -X POST http://myldmhost:18080/preview/backups
curl -X POST http://myldmhost:18080/preview/backups?mask=false
In the above example,
myldmhost should be replaced with the IP address or domain name of the server hosting LiveData Migrator.
By default, the backup file will be stored in
/opt/wandisco/livedata-migrator/db/backup with a filename following the pattern
backup.dateTtime, such as
mask parameter, which is
true by default, means secure keys - such as those used to access filesystems - will be masked for security purposes. This means they will have to be resupplied with the correct values after recovery. If the
mask=false parameter is supplied, the backup will store these properties as plain text. It will therefore not be necessary to resupply them.
Use the following command to write the backup to a specified file (in this case,
curl -X POST http://myldmhost:18080/preview/backups?mask=false > backup.json
Before restoring LiveData Migrator from a backup, you should delete the
default-db file to ensure there are no setting conflicts. By default, the folder is in the following directory:
The restoration process will still reinstate your previously backed up settings, meaning you will not lose them.
Restore LiveData Migrator from a backup by using the following curl command:
curl -X POST -H "Content-Type: application/json" -d @backup.json http://myldmhost:18080/preview/backups/restore --verbose
In this example, the backup file is named
backup.json and the file is located in the user's current working directory.
LiveData Migrator will automatically create a backup every sixty minutes when the backup and restore feature is enabled. Add
application.properties to modify the time interval in minutes. For example: