Is it possible to trigger a scheduled backup via command line?
Let’s assume, you have two scheduled backups: a full backup once a week (Sunday) and an incremental backup 6 days of the week (Monday to Saturday). To trigger one of these backups manually, you can login to webmin, go to: Virtualmin -> Backup and Restore -> Scheduled Backups -> click “Backup” under “Actions”.
I would like to force the execution of the backup via command line. Is this possible?
I do not want to backup a specific virtual server (which would be: virtualmin backup-domain --dest … --domain …), but a scheduled backup with all settings configured. I understand that these backup configs are stored in:
It is, unfortunately, not in the virtualmin command line client, but it can be done via a bit of trickery.
In /etc/webmin/virtual-server there will be one or more files named something like “backup.pl --id 87873427221”. You can see which one you need in the UI by hovering over the description of the scheduled backup. Or, you can see the backup IDs with “# virtualmin list-scheduled-backups --multiline”
Running that line on the command line, as in:
# ./backup.pl --id 87873427221
That will kick off the backup. Note that it won’t stop the same backup from happening when it is scheduled to happen.
I’ll ask Jamie to add this capability to the CLI, as it would be easy to make this possible.