Below are examples of commands and configuration files for the SqlBak-CLI utility:
1. Backup three databases, and saving to /backups/
Command to run a backup
Backup settings
Command to run a restore
Restore settings
2. Backup all MySQL databases on Windows and send to a Linux server over SSH
If the backup was successfully sent over SSH, then the backup job will delete previously uploaded backups that are older than 168 hours (7 days).
Command to run a backup
Backup settings
Command to run a restore
Restore settings
3. Backup MySQL Server and send backup to FTP, in case of failure save in local folder.
For backup storage, you can set the flag is_emergency to true; backups will only be sent to this storage if the sending to non-emergency storages fails.
We recommend always using at least one emergency storage.
Command to run a backup
Backup settings
Restore settings
In this example, the database is restored under a different name: sakila -> copy_of_sakila