[Gllug] Running TAR backup through Root's Cron
John Edwards
John.Edwards at cornerstonelinux.co.uk
Thu May 15 12:09:34 UTC 2003
On Thu, May 15, 2003 at 12:20:00PM +0100, Richard Jones wrote:
> On Thu, May 15, 2003 at 11:53:54AM +0100, Steven Bellamy wrote:
>> Hi,
>>
>> I'm having a problem running a backup through Cron.
>> I've created a very simple backup script (using TAR and Crontab for the user
>> Root) to run backups at 01h00 everyday to backup a Squid Proxy Server in a
>> remote office.
>> The problem is that the backup only seems to backup about 140MB of data and
>> then stops, if I run the same script from the shell (as root), it backs up
>> the entire server.
>> I have looked through the cron logs and syslogs but can't find any error
>> messages.
>>
>> Anyone have any suggestions?
>
> Not about your specific problem, but it's often helpful in your
> crontab to have:
>
> MAILTO="your at email.address"
> 0 1 * * * /path/to/the/script.sh
>
> Add some debugging to the script too. For example, print the entire
> environment at the start of the script using the 'printenv' command.
> Echo commands, by putting 'set -x' at the top of the script. Also
> make sure any critical programs are running in verbose mode, eg using
> the -v option to tar.
>
> Rich.
If the tar command is saving to a file adding a df command is also useful
to see what space is available before and after the operation.
Alain Williams did a presentation on shell scripts at a UKUUG conference
a year or so ago (Feb 2002 ?) where he described a method of making
standard shell commands report a lot of debugging information to log
files to trace problems. The paper may still be on http://www.ukuug.org/ .
--
#--------------------------------------------------------#
| John Edwards Email: John.Edwards at uk.com |
| |
| "SEP is intended as a management routing protocol, |
| and should not be used in a production enviroment." |
#--------------------------------------------------------#
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list