Hello, all! I have a backup script that is puzzling me. When I run it manually from the command line (as root) it quite happily goes off and makes a nice tarball of specified directories and plops it as a dated file of some 50Meg into a samba-mounted directory on the main ntserver, so it can be grabbed by the backup tape running from there. 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? Thanks, Jenny.