[rhn-users] Tar problem

Bill Watson bill at magicdigits.com
Wed Apr 4 21:26:39 UTC 2007


Any chance your output file is hitting 2Gb or some other magical file size?
Bill Watson
bill at magicdigits.com

-----Original Message-----
From: rhn-users-bounces at redhat.com [mailto:rhn-users-bounces at redhat.com] On
Behalf Of Richard Riley
Sent: Wednesday, April 04, 2007 2:20 PM
To: rhn-users at redhat.com
Subject: [rhn-users] Tar problem


I have a nightly backup process that uses tar writing the output to a file
on an NFS mount.  It had been working fine for weeks and suddenly on Tuesday
started failing with error code of 141.  Anyone know where I can find out
what the error code means.  I have tried a google search and looking at tar
source code, both to no avail.  I have another machine running the exact
same script also writing to NFS mount and is experiencing no problems.  The
machine that has started failing is RHEL 3.  The second machine is running
RHEL 4 and the NFS server is running RHEL 4.  They are manually kept up to
date using up2date command.  Here is the script.

day=`date +%a`
if [ "$day" == "Sun" ]
   then
        STAMP="Wk`date +%U`-$day`date +%m%d%H%M`"
   else
        STAMP="$day`date +%m%d%H%M`"
fi

logfile=/var/log/db-bkup/bkuplog-$STAMP
db_bkup_file=$bkup_hold_dir/`hostname`-db_bkup-$STAMP.tar.gz

# Stop mysql process to start backup, force flush to disk /sbin/service
mysql stop

echo "backup started at `date`" >$logfile
cd /home/

# backup /var/lib/mysql to $db-bkup-file directory
tar -czv --ignore-failed-read --totals mysql >$db_bkup_file 2>>$logfile
CODE=$? if [ $CODE == 0 ] then
   echo "backup completed at `date`" >>$logfile
else
   echo "Backup failed at `date` with error code ($CODE)" >>$logfile fi

# Start mysql service again, will resync with master at this point
/sbin/service mysql start


The tar command is failing in the exact same place every time, regardless of
when run from cron or kicked off manually.  I know this by the logfile which
shows a list of all the files written.  It appears to be part way through a
directory.  If I run tar on that directory alone, it completes fine.  I can
find no other error indicators.



Richard Riley
System Administrator

Procuri Inc.
www.procuri.com





_______________________________________________
rhn-users mailing list
rhn-users at redhat.com https://www.redhat.com/mailman/listinfo/rhn-users






More information about the rhn-users mailing list