LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2008, 01:52 PM   #1
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 46

Rep: Reputation: 15
Tar error at XXX XXX X, code 1 - what is the meaning ?


I have a regular backup script that runs every night. I regularly get the above error message when it runs. The tar command is
Quote:
tar -czvf $BACKFILE /etc /home /var/lib/samba > /dev/null 2>&1
This is a typical output:
Tar error at Wed Mar 5 03:21:33 EST 2008, code 1

What is the meaning of this, what can I do to get rid of it, and does it matter?

TIA.
 
Old 03-04-2008, 02:17 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I assume you run the tar to make a backup because it has meaning to you to do so. Therefore, any error in re running the tar backup does, by definition, matter.

Inspect your error logs in /var/log for entries at or near the time the error occurs. There may be useful information to solve the puzzle.
 
Old 03-04-2008, 02:43 PM   #3
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 46

Original Poster
Rep: Reputation: 15
The tar command backs up all of my users' files and a script stores them remotely on another PC.

There's nothing in the logs that helps.

Because the tar files are quite large its difficult to unpack them and inspect the contents. I have done so in the past and there doesn't appear to be a problem.

It would be difficult to debug a verbose output of the command because there are so many file backed up.
 
Old 03-04-2008, 03:01 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
From the "info tar" manual:
Code:
   Possible exit codes of GNU `tar' are summarized in the following
table:

0
     `Successful termination'.

1
     `Some files differ'.  If tar was invoked with `--compare'
     (`--diff', `-d') command line option, this means that some files
     in the archive differ from their disk counterparts (*note
     compare::).  If tar was given `--create', `--append' or `--update'
     option, this exit code means that some files were changed while
     being archived and so the resulting archive does not contain the
     exact copy of the file set.

2
     `Fatal error'.  This means that some fatal, unrecoverable error
     occurred.
So while tar was backing up a file, it was modified.
You might want to look into --listed-incremental. They could result in smaller files and faster backups. Using --listed-incremental with create will create a timestamp file. On subsequent backups, only files modified since the last backup will be modified. See section 5.2 of the info manual for details.

Last edited by jschiwal; 03-04-2008 at 03:15 PM.
 
Old 03-04-2008, 03:06 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
One problem I've read of with tar backups and unidentified/unresolved errors is that, at some future time, a file which is seldom accessed is suddenly needed. The file name is in the system, but the file is empty. So, it may be worth your time to search your system for empty files. It should be safe to conclude that if there is an empty file in the system now, it's also empty in the backup.
 
Old 03-04-2008, 03:19 PM   #6
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks for your useful information. I store emails in /home/*/Maildir/ and I suspect that these are changing while the backup occurs. Maybe contents of /etc/ do as well. Does this sound plausible?

I prefer to do full backups every time. Makes for trouble-free restoration of files and I have enough storage and time to do them.
 
Old 03-05-2008, 05:19 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
The file in /etc/ should be fairy static. A users Maildir might not be. The /var and /tmp directories are changed very frequently. ( /tmp shoudn't be backed up anyway ). If you have a database server running, you should use a database backup tool instead. If possible, backups should be performed in "init level 2" single user mode.
 
Old 03-06-2008, 05:43 AM   #8
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 46

Original Poster
Rep: Reputation: 15
I assume that all the files will be backed up even if an error 1 occurs. If I don't direct the output to /dev/null it still appears to get to the end of the backup. If the odd email arriving at this time doesn't get backed up I could probably live with it. There are no users using the machine at 3am.

Going into runlevel 2 seems a bit excessive for what I'm trying to achieve and results in the server being offline for a while. I believe that I could also use LVM to do a snapshot then back it up, but once again that's probably not necessary.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error, some other host already uses address XXX.XXX.XXX.XXX" mwbb_support Linux - Networking 5 01-20-2014 08:59 AM
Error, some other host already uses address xxx.xxx,xxx,xxx ryan462 Linux - Networking 20 01-24-2010 11:14 PM
smbclient -M xxx.xxx.xxx.xxx Doesnt Work DiscreetControl Linux - Networking 7 12-28-2007 10:50 AM
Problem getting connection with a DLink Router after setting static IP 10.xxx.xxx.xxx kezira Linux - Networking 1 11-09-2005 10:27 PM
Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server ocavid Linux - Newbie 2 03-16-2005 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration