Hi Jenny,
On 11-Mar-02 Jenny_Hopkins@toby-churchill.com wrote:
However, when i set it as a cron task (for root) it only makes a tiny little file, every single time. I thought it may be a samba share problem so i set it to back up to a linux directory and then copy it over, but it still only makes this tiny file. Contents of the back-up file: the weekend ones were the ones scheduled to run by cron, and the big one one where I ran it a moment ago from the command line. -rwxr-xr-x 1 root root 14211 Mar 9 22:00 trx-090302.tgz -rwxr-xr-x 1 root root 14211 Mar 10 22:00 trx-100302.tgz -rwxr-xr-x 1 root root 49334571 Mar 11 11:29 trx-110302.tgz
And here is my backup script (please don't laugh at it though!): #!/bin/bash
OF=/backup/trx-$(date +%d%m%y).tgz tar -cvzf $OF /var/www/ /home/cvs
And finally what i have set crontab for root for: 0 22 * * * /root/trxbackup
Can anyone see anything daft I've done?
Nothing obvious. It's worth bearing in mind that cron jobs may not use the same environment as command-line jobs, though I can't see why that should matter here.
However, one thing I do notice is that the two small files are of the same size, suggesting that exactly the same stuff is being archived in each (whatever it may be).
You may, therefore, get a clue by have a look at what's inside.
Try, in the first place,
tar tzvf trx-090302.tgz tar tzvf trx-100302.tgz
and compare it with what it should be.
Hope this helps, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 167 1972 Date: 11-Mar-02 Time: 12:24:18 ------------------------------ XFMail ------------------------------