Backup and restore
Canvus client provides a simple command-line interface for backing up and restoring local canvases stored on the machine running the client.
Note
Canvus client backup and restore does not affect shared canvases stored on a Canvus Connect server. See server server-backup to make backups of a Canvus Connect server.
You can restore a backup to exactly the same or newer version of Canvus client on which it was created.
The default backup settings are stored in the client configuration file for automatic backup creation on upgrade. The application returns an exit code indicating success or failure after executing a task. Additional information may be displayed in the terminal.
Warning
Canvus client does not backup any configuration files or system files. Read about client-backup-configuration-files.
Backup
The Canvus client backup can be configured using the client configuration file. The backup procedure is controlled by the client application binary.
Note
A backup of the client data can be made while the client is running.
Configuration
The location of the backup can be set in the mt-canvus.ini file as defined below. :
[backup]
; Default path to store automatic client backups. Set to empty to disable
; automatic backup on software update.
; DEFAULT (Linux): ~/MultiTaction/canvus/backups
; DEFAULT (Windows): <LOCAL APP DATA>\\MultiTaction\\canvus\\backups
; root=/home/multi/MultiTaction/canvus/backups
Backup procedure
Info
3.0.3 Added Canvus folder to be included in the backup
Backup procedure is controlled by mt-canvus-app application. The following command line arguments control the backup process:
--backup
: Starts the backup process. Will block until the process is completed and returns an exit code to indicate if the operation succeeded or failed.
--backup-path
: (Optional) Specifies the folder where the backup is written to. If specified, the backup is written directly to the given folder. If not specified, a new subfolder is created in backup/root folder specified in the configuration and the backup is written to the subfolder. The subfolder name follows the format: \<unix epoch time>_\<year>_\<month>_\<day>_\<canvus version>_canvus_backup. For example, 1525264099_2018_05_02_2.0.1_canvus_backup
--backup-skip \<list>
: (Optional) Can be used to exclude parts of the data from the backup process. \<list> can be a comma-separated list of following tokens:
- db
- assets
- canvus-folder
For example, to only back up Canvus folder without local canvases:
--backup-skip db,assets
--backup-delete
: Will delete all files and folders in the backup-path prior to writing the new backup in there.
The backup procedure will generate the following files (unless skipped) in the specified backup path:
- documents - path containing the local database JSON files, similar to how the client data is stored within the client
- assets - folder containing all assets without additional uncompression
- Canvus-folder - copy of the default canvus folder under the canvus-data folder.
Warning
Only the default Canvus folder location in multi-user mode is included in the backup. In single user mode, the user\'s home folder is not included in this backup. Similarly, if a custom Canvus folder location is specified in the configuration (system/canvus-folder) it is not included in this backup. Backing up these custom locations has to be done separately.
- mt-canvus-backup-metadata.json - metadata about the backup, like software version number, indication this is a client backup, and time stamp of the backup
Hint
Typically you would use the following commands to create a manual backup of your local canvases to the configured backup path:
Ubuntu:
/opt/mt-canvus/bin/mt-canvus-app --backup
Windows:
"C:\Program Files\MT Canvus\bin\mt-canvus-app" --backup
Automatic backup
When Canvus client will perform migration of data from old format to new, it will create an automatic backup of the existing data before the import. This backup also includes the assets in the canvases, like pictures, videos, etc.
Storing configuration files
The backup command does not store your configuration file, log files, or license files. You may also want to backup your config.txt and screen.xml, if you have to perform a full machine restore.
The backup does not include any system files, such as the operating system\'s display layout configuration.
Restore
To restore a client backup, you need a working Canvus client installation.
Warning
The client must not be running while restoring a backup.
Restore procedure
Restore procedure is controlled by mt-canvus-app application. The following command line arguments control the restore process:
--restore
: Starts the restore process. Will block until the process is completed and returns an exit code to indicate if the operation succeeded or failed.
--backup-path
: Specifies the folder from where the backup is read from. If path is not specified the command will fail.
First the process will verify the mt-canvus-backup-metadata.json to determine if it can proceed with the restore operation. For example, early exit can happen if the backup has been made with a newer software version than that which is current running. If the validation passes, the procedure will continue as follows:
- If the metadata specifies documents: The restore process will remove the current local documents and restore them from the backup.
- If the metadata specifies assets: The restore process will remove all existing assets and restore the ones from the backup.
- If the backup contains Canvus-folder: The restore process will copy the files in this folder to the default Canvus folder location. Any existing files in the Canvus folder not overwritten by the restore are left as is.
Hint
Typically you would use the following commands to restore a backup of the Canvus client:
Ubuntu:
/opt/mt-canvus/bin/mt-canvus-app
--restore --backup-path ~/MultiTaction/canvus/backups/
Windows:
"C:\Program Files\MT Canvus\bin\mt-canvus-app" --restore
--backup-path %LOCALAPPDATA%\MultiTaction\canvus\backups\