On Thu, 6 Jan 2005, Chris W. Parker wrote:
Hello,
I've been running a script in /etc/cron.daily that tar's the /etc, /home, and /var directories and then gzip's them. After the gzip they are FTP'd to a backup server.
I've just had the need to retrieve a file in one of the backups and it turns out they are all corrupt! This is not good. :(
[root@hachiroku ~/temp]# gzip -t 01-01-05.home.tar.gz
gzip: 01-01-05.home.tar.gz: invalid compressed data--format violated [root@hachiroku ~/temp]#
This is the script I am using, maybe there is a problem with it?? Or maybe the corruption is happening during the FTP transfer?
If they are all corrupt then there is probably little you can do now.
As a suggestion, it may pay to modify the script, use ssh shared key authentication and scp for the upload and md5sum the files both before the transfer and after the transfer on the remote system (scp is not really necessary but shared keys allow you to do things like..
scp $local_file $remote_system:$remote_file
MD5=`md5sum $local_file` REMMD5=`ssh $remote_system md5sum $remote_file`
if [ "$MD5" != "$REMMD5" ]; then echo "files dont match" exit fi
quite easily to ensure that your files copied ok.)
Doing verification on the integrity of the archive before deleting the older versions is usually considered a good thing [tm]
-- Steve.
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list