LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2010, 03:33 AM   #1
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
Tar giving me errors


Hello!

First off I would like to say sorry for not being able to research this down to the fix due to me haveing dial up eh!

Okay now my issue. I am trying backup my whole system befor I do massive changes and I am getting some issues.

System specs
-----------------
Ubuntu 9.04 x84_64
4GB Ram
AMD Athlon(tm) 64 X2 Dual Core Processor 5600+

Okay here is the issue. When I run the command
Code:
james@james-desktop:/media/disk$ sudo tar -cvpzf backup.tar.gz --exclude=/media --exclude=/proc --exclude=/mnt --exclude=/dev --exclude=/lost+found  --exclude=/sys /
It start archiving everything and when I get the end I get an error that says..
Quote:
tar: Error exit delayed from previous errors
So I tried to check all my error and output onto a file by typinging
Quote:
james@james-desktop:/media/disk$ sudo tar -cvpzf backup.tar.gz --exclude=/media --exclude=/proc --exclude=/mnt --exclude=/dev --exclude=/lost+found --exclude=/sys / > output 2> error
bash: output: Permission denied
I get a permission denied. So now I am not sure why I am getting that now so I check


Code:
sudo visudo
Quote:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Which shows that sudo is setup right far as I can tell.

Quote:
james@james-desktop:~$ cat /etc/group |grep admin
lpadmin:x:106:james
admin:x:121:james

<More entries are listed in the file>
So here are the questions. How do I stop that error and why is it not allowing me to use the > and 2> options with it?

Thanks

Last edited by jmc1987; 09-02-2010 at 03:36 AM.
 
Old 09-02-2010, 03:52 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Read this link. http://ubuntuforums.org/showthread.php?t=35087
This link talks about the same what you are trying to achieve. And according to the link:
Quote:
At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something, but in most cases you can just ignore that.
 
Old 09-02-2010, 04:40 AM   #3
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Original Poster
Rep: Reputation: 113Reputation: 113
Hmm wonder how come I didn't fine that forum.

Okay so the error really doesn't mean my archive broke. otherwise ignore it.

but what about my 2nd question. I don't understand why it is denying me to use the > output 2> error commands.
 
Old 09-02-2010, 04:50 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
What do you exactly want to do? Just log the tar command? Use redirect operand ">>" to a file that you know exists and you got permissions to write to it.

tar -cjvf blah blah >> /tmp/tar.log
 
Old 09-03-2010, 07:38 AM   #5
skola
Member
 
Registered: Nov 2009
Posts: 66

Rep: Reputation: 19
I know tar should have no problem backing up a whole system's pile of Gbs certainly under a powerful spec'd PC.

Even with plenty space, one big file is somewhat unwieldy. I would tend to do each directory and then it's simpler if you only need to restore from that.

I notice you exclude certain dirs from the big file but do you do them seperately?
I ask because when I do backup it's not from the booted hdd so I see that some of those supposedly self-refreshers still have sub-dirs, so I back them all up.

I do this. with my cursor being at the root of the hdd being backed up.
NB. (leaving out compression and backup medium for clarity)

tar --no-recursion -cvf basedirs.tar * gives me the whole dir base structure and any files in the / root dir.

tar -cvf bsbin.tar bin
tar -cvf bsetc.tar etc

and continuing on down, usually breaking up /usr into 3 seperates.

Makes lfe less complex for me anyway.
 
  


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
'make' giving errors... bharathp Linux - Hardware 9 11-21-2009 11:12 PM
up2date giving me errors Guess Linux - Newbie 3 09-10-2007 08:28 AM
groupadd is giving some errors Sailesh Linux - Newbie 1 09-08-2006 02:12 AM
FnFx giving errors?? Please help stelmate Linux - Laptop and Netbook 2 08-09-2005 02:37 AM
RPMs giving me errors RH 9 deadkennedys Linux - Software 5 05-19-2004 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration