- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Scripting question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 09:07 PM
02-16-2005 09:07 PM
I am having a problem with a backup script (see attached doc) on Linux RH AS3.1.
The script attempts to back up the entire system but constantly completes with an error message (2).
However when I run the exact same script but only tarring up a few dir's I don't receieve any error messages.
All advise is welcome.
Rgds,
Dermot
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2005 10:56 PM
02-16-2005 10:56 PM
Re: Scripting question
can you please find out what the actual return code value is i.e. echo $ERRORCODE
It may be a warning that the /bin/tar executable or other file is in use and can't be backed up.
Check thread 141729 for some clues as to the possible causes of the various codes.
Let us know if this is resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 02:54 AM
02-17-2005 02:54 AM
Re: Scripting question
var/webmin/sessiondb.pag
var/webmin/sessiondb.dir
var/webmin/miniserv.log
var/webmin/webmin.log
/bin/tar: Error exit delayed from previous errors
+ ERRORCODE=2
+ sync
+ sleep 3
+ echo Tar Complete
Tar Complete
+ '[' '!' 2 == 0 ']'
+ echo 'Error(2)' with backup full weekly on COVCACHE
+ mail -s 'IMPORTANT NOTIFICATION' dermot.duffy@walshwestern.com
Big points for any takers.
Rgds,
D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 06:16 AM
02-17-2005 06:16 AM
Solution( pulled from debian: man tar )
--ignore-failed-read
don't exit with non-zero status on unreadable files
If the file is locked by another process tar will still fail to archive it but it won't tank your backup.
--Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 06:25 AM
02-17-2005 06:25 AM
Re: Scripting question
I haven't run redhat for a while, but I'm sure it has a version of star. I like to think it stands for Super TAR, but its probably named after the author. It has a lot of more flexibility if you wanted to extend your backup to do differential archives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 08:05 PM
02-17-2005 08:05 PM
Re: Scripting question
the most common causes for return code 2 are:
directory checksum error
Tar: tape write error
I am suprised that there were no "previous errors" logged.
Can you check the intergity of the backup, as this may all still leave you with a valid backup (less temporary files).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2005 09:40 PM
02-17-2005 09:40 PM
Re: Scripting question
The '--ignore-failed-read' option is what was missing, and once added to the tar cmd returned an error code of zero which is good.
Thanks again,
D