Backup restore doesn't work from CRON

SYSTEM INFORMATION
OS type and version REQUIRED
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

Hi there,

We are trying to write a CRON that will allow us to do automated webserver restores, using the following command:
virtualmin restore-domain --source /home/backup/server_restore/incremental/$(date +"%Y-%m-%d")_incremental.tar.gz --all-domains --all-features --reuid

This works perfectly from the command line (using root) but does not work when used in a CRON.
The reported error is:
/bin/sh: 1: virtualmin: not found

Anyone got any ideas on how to make this work?

@Beany,

Make sure the command is being issued by the “root” user, and perhaps add the absolute path for “virtualmin” which is usually:

/usr/sbin/virtualmin
1 Like

Thank you so much!
It was the /usr/bin/ part that I was missing.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.