Create a backup schedule from command line

Hello,

I'm looking to enable scheduled backups of all the domains via cli or api. Right now this call does not exist. Could anyone point me in the right direction with regards to enabling this via workarounds?

Regards, Lucian

Status: 
Closed (fixed)
Virtualmin version: 
6.09
Webmin version: 
1.942

Comments

Ilia's picture
Submitted by Ilia on Thu, 02/11/2021 - 07:57

You could try creating a config file in /etc/webmin/virtual-server/backups based on an existing config.

However, you'll also need to setup a cron job to run /etc/webmin/virtual-server/backup.pl --id XXX where XXX is the name of the config file you created.

Ilia's picture
Submitted by Ilia on Thu, 02/11/2021 - 07:57

We'd recommend you update outdated Virtualmin 6.09 to the latest 6.14 and Webmin 1.942 to 1.962.

Thanks,

I've added in the UI a scheduled backup (hourly) to test and expected to see something new in "crontab -l -u root", but actually no cronjob was set there.

How does Webmin/vmin know to run that scheduled backup every hour?

Ilia's picture
Submitted by Ilia on Fri, 02/12/2021 - 06:27

Please upgrade Webmin and Virtualmin to the latest versions - it's not recommended to run outdated software.

How does Webmin/vmin know to run that scheduled backup every hour?

Have a look at Webmin > Webmin Configuration > Webmin Scheduled Functions page.

Webmin has it's own internal cron functionality, so you won't see scheduled backups at System -> Scheduled Cron Jobs. Instead they appear at Webmin -> Webmin Configuration -> Scheduled Functions.

However, you can run a scheduled backup via a regular cron command, as mentioned in comment #1.

Thanks guys, that should work for me.

Status: Fixed ยป Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.