Ordinary users cannot see root's crontab for obvious security reasons.
I presume you already ran the backup command manually from root's account either via sudo or su. If it works there, and you have the time syntax correctly specified, just wait until after it's supposed to run and check the results.
If the command is actually a script, or is easily scriptable, then the standard method for scheduling a daily task with root privileges is to create a symbolic link to the script in /etc/cron.daily. So if you want to run /usr/local/sbin/backup every night, just do this:
Code:
cd /etc/cron.daily
sudo ln -s /usr/local/sbin/backup
You can adjust the time when scripts in this directory are run by editing (as root) the file /etc/crontab. Oh, and Debian-based systems like Ubuntu have a bug that requires scripts linked from the cron.* directories not to end in .sh. So the entry I gave above will work, but not one that points to backup.sh.
Bookmarks