Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I need some help with doing backups on a Ubuntu 8.04 LTS server. I have created a cron job that does not want to run. What am I doing wrong? Something simple am sure.
The crontab looks like this: 20 11 * * 4 tar -cWPpf /dev/st0 /home/public $
I know the command works cause I can run it from the command line OK but, I do have to use root. I tried using the sudo command in the crontab but, that did not work either.
Any help or suggestions would be appreciated.
Cron jobs do not run the login scripts so your usual shell environment is not available. You may have to use the full path to the commands that you want to run such as using /bin/tar instead of just tar.
most distros will at least have mail configured for local delivery (ie, not over the network). Just use the 'mail' command line utility to access your local messages. see 'man mail' for details.
To test sending a message (assuming your login is 'wayne')
mail -s test -c root wayne
type some message using stdin here....
to end the message type Ctrl-D, or if your a SMTP traditionalist
just type a period as the first and only character in the line
The message should be sent to /var/mail/wayne (or wherever your system's mailboxes are). Then use 'mail' with no options to read your inbox.