[Gllug] Running TAR backup through Root's Cron
Alistair Mann
alistair at lgeezer.net
Thu May 15 12:20:36 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thus spaketh Steven Bellamy on Thursday 15 May 2003 11:53 am:
> 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.
Does this mean the tar is on a different machine to the filesystem it is
backing up? If so, consider if a timeout is occuring.
> 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?
It would help if you posted the tar command you're using. On non critical
machines, I normally use:
tar jcvfp archive.bz2 --exclude-from='file' /path/to/root/dir
On more critical machines, I would do:
find <source dir> -type f | grep -v <exceptions> | cpio -moca | bzip2 -c \
>archive.bz2
For several reasons: first, find and grep are more choosy about what they copy
that tar (pipes are the worst). Second, cpio has a CRC check in it that tar
doesn't: that gives extra notice of problems, thought admittedly it does
nothing more to help recover that bad archive.
Cheers,
- --
Alistai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+w4YUmxw6F+mBuhURAg4NAJ9FCPmtB90AUXVmY6oagrl64bbnIgCeMZ0R
FbXgy1wFBd6onI8gU1594/o=
=kFcX
-----END PGP SIGNATURE-----
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list