Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 5th August 2005, 07:32 AM
Papoon Offline
Registered User
 
Join Date: Apr 2005
Posts: 32
tar generates baffling error message

Hmm. I'm trying to back up my data directories to a gzipped file, something I've done before (once).

It was like this, y'see. I was running a root console, okay? I changed directories to /home, and entered the following command:

tar -cvfz Au_4_05_backup.tar.gz /home/papoon

One month ago, this convenient and easily memorized alphanumeric string generated a 50mb gzipped file which I then plopped onto a CD and Bob's your uncle. Today ...

tar: Error exit delayed from previous errors.

And in the directory, no .gz file but instead, a massive file called z --- no last name or extension, just the letter z. I tried this command three times (I couldn't believe my eyes),
and each time the size of the generated file differed.

Any insights, advice out there? What am I doing (wrong)?
Reply With Quote
  #2  
Old 5th August 2005, 07:50 AM
hbol Offline
Registered User
 
Join Date: Oct 2004
Location: Netherlands
Age: 44
Posts: 37
tar zvclf will work.

I do not know why this is, but it will work.
Reply With Quote
  #3  
Old 5th August 2005, 03:57 PM
Papoon Offline
Registered User
 
Join Date: Apr 2005
Posts: 32
Thank you, it does. Now my question is ... why?

1. This has worked up until now without the -l option, which as near as I can tell means "Do not archive files from other filesystems." I don't _think_ I have any such thing on this box, but ... I'm not sure what the switch means. Can anybody explain what this little -l does, why I need it this month but did not need it last month?

2. The backup file which weighed in at 50mb last month is up to 248mb this month. I'm pretty confident that I don't actually have 250mb (or 50mb, or even 5 mb for that matter) of data on this computer even uncompressed, and I can't imagine what I've done to add 200mb to this computer (90 percent of what I do involves HTML and e-mail files). Any ideas where this bloat is coming from?

3. According to the only handbook I have, Linux in a Nutshell by Siever, Figgins, and Weber, my tar options _must_ begin with the -c. But the only tar command which works this month (-zvclf) does not. What is the manual trying to tell me, how can something this basic be so hilariously mis-documented, etc. --- ???

I can't figure out what I'm doing differently this month; and I can't for the life of me figure out why I need to spend so much time scratching my head about this. How come a command that worked fine on June 12 works differently on August 4?
Reply With Quote
  #4  
Old 6th August 2005, 04:55 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
Looks like -f needs to be last, otherwise the next option will be the file name.

Try xcvzf.
Reply With Quote
  #5  
Old 6th August 2005, 05:15 AM
robatino Offline
Registered User
 
Join Date: Feb 2004
Posts: 845
Here's a little script I wrote that makes the tarfile and burns it to CD. I use star instead of GNU tar (if you don't, replace star with tar). The ordinary output from star (or tar) goes to /tmp/toc.txt which is later written to the CD. The error output goes to the terminal, so if you see something bad you can exit without making the backup. If you have more than one user directory in /home, you need to be root, otherwise you can make the backup as an ordinary user.

#!/bin/bash
DEV=/dev/cdrom
rm -f /tmp/home.tgz /tmp/toc.txt /tmp/home.iso
cd /home
echo 'Creating compressed tar archive...'
star zcvf /tmp/home.tgz * > /tmp/toc.txt
echo 'To make a backup:'
echo 'Insert a CD, enter a nonempty CD label name, and press ENTER.'
echo 'To exit without making a backup:'
echo 'Just press ENTER.'
echo -n 'CD label? '
read LABEL
cd /tmp
if [ -n "$LABEL" ]
then
mkisofs -R -V "$LABEL" home.tgz toc.txt > home.iso
while umount $DEV ; cdrecord -v blank=fast driveropts=burnfree dev=$DEV home.iso
do
eject $DEV
echo 'To make another backup copy, insert a new CD and press ENTER.'
echo -n 'To exit, remove the CD and press ENTER.'
read
done
echo 'No writable CD detected in drive, exiting.'
rm home.iso
fi
rm home.tgz toc.txt
Reply With Quote
  #6  
Old 6th August 2005, 08:58 AM
Papoon Offline
Registered User
 
Join Date: Apr 2005
Posts: 32
Thank you, Jman. That makes some sense, that the -f needs to be the last option. My Linux in a Nutshell says nothing about this, nor does the man page; but I do note now that every example I've seen of the tar command in action has the -f switch as the last option.

On the other hand, both Linux in a Nutshell and the man page explicitly state that the tar options MUST begin with one of a number of options, not including -z; but that turns out to be untrue. A mystery, but one I can live with.

And thanks to you, too, Robatino. I haven't gotten into writing scripts yet, but I will take a close look at yours; there's lots of interesting stuff there. Maybe it'll even form the basis of my first script.

Meanwhile, my backup needs are pretty basic, and manually creating the tar-chive, and burning it to disk using K3B, meets my needs (when I can do it, anyway) for now.
Reply With Quote
Reply

Tags
baffling, error, generates, message, tar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login generates error dialg... GrayFox Using Fedora 1 8th August 2008 03:54 AM
eclipse generates error trying to display help or C/C++ tutorial inorganic Using Fedora 0 8th February 2008 07:48 PM
Extremly Baffling Problem- Helppp saratee Servers & Networking 9 9th May 2006 11:36 AM
kernel error message: hda: dma_intr: error=0x84... HadroLepton Using Fedora 5 13th January 2005 05:38 PM


Current GMT-time: 23:47 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat