Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I think TAR changed :( (app-arch/tar-1.14.90-r1)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Sun Nov 07, 2004 6:12 pm    Post subject: I think TAR changed :( (app-arch/tar-1.14.90-r1) Reply with quote

Is it me, or is something wrong with tar? I tried this to create a bzip2 archive...
Code:

tar -cjf archive.tar.bz2 directory

... and I got this...
Code:

tar: Bad Option: -cvjf.
Usage:  tar cmd [options] file1 ... filen

Use     tar -help
and     tar -xhelp
to get a list of valid cmds and options.

Use     tar H=help
to get a list of valid archive header formats.

Use     tar diffopts=help
to get a list of valid diff options.

I thought I might be typing it something wrong (it could happen, haha) but I tried using xffm4 to create an achive (gzip) and I got the same results. I checked the man page, and it seems the syntax hasn't changed. Is this just me? I'm running app-arch/tar-1.14.90-r1
Back to top
View user's profile Send private message
etnoy
Apprentice
Apprentice


Joined: 29 Aug 2003
Posts: 255
Location: Västerås, Sweden

PostPosted: Sun Nov 07, 2004 10:17 pm    Post subject: Reply with quote

run tar w/o the dash in front of the options

HTH
_________________
The md5sum of the above post is 06280ccd85ef9deb49c336e7945f4b5c

God is dead! - Nietzsche
Nietzsche is dead! -God
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Mon Nov 08, 2004 7:53 pm    Post subject: Reply with quote

Thanks, that worked! Tar has changed quite a bit. The verbose output is different. I wonder why they got rid of the "-". Programs like xffm4 will need to be upggraded. Oh well. :)
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Wed Nov 10, 2004 8:39 pm    Post subject: Reply with quote

I noticed more wierdness. The option to stay in the same file system seems to be ignored. I had to use the --exclude option to get a similar effect. I figured that since I only wanted to backup /, that I could use the "l" options to exclude what shouldn't go into a backup, like /sys, /dev/, and my external USB HD. Here's what's mounted:
Code:

/dev/hda6 on / type reiserfs (rw,noatime)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type tmpfs (rw)
none on /dev/pts type devpts (rw)
none on /proc/bus/usb type usbdevfs (rw,devgid=85,devmode=0664)
none on /dev/shm type tmpfs (rw)
/dev/usbhd on /mnt/usbhd type reiserfs (rw,noexec,nosuid,nodev)

So, from /, I did this...
Code:
 tar cjplf /mnt/usbhd/backups/rootfs-20041110.tar.bz2 --wildcards --exclude "dev/*" --exclude "proc/*" --exclude "sys/*" --exclude "mnt/usbhd/*" *

Note: I just left the "l" option for good measure. Oh, and I normally do backups from the LiveCD, so I don't encounter this problem. The LiveCD is old, so it's got an older version of tar. If that even matters.
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Sun Nov 21, 2004 2:56 pm    Post subject: Reply with quote

Ahhh! I'm going to pull my hair out :twisted: I just tried the same EXACT command (different date) to do another backup.
Code:
tar cjplf /mnt/usbhd/backups/rootfs-20041121.tar.bz2 --wildcards --exclude "dev/*" --exclude "proc/*" --exclude "sys/*" --exclude "mnt/usbhd/*" *

and now I get...
Code:

tar: Bad Option: --wildcards.
Usage:  tar cmd [options] file1 ... filen

Use     tar -help
and     tar -xhelp
to get a list of valid cmds and options.

Use     tar H=help
to get a list of valid archive header formats.

Use     tar diffopts=help
to get a list of valid diff options.

If I remove --wildcards it complaints about --exclude. It worked a week ago. It's the same version of tar. What the hell :evil:
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Sun Nov 21, 2004 4:27 pm    Post subject: Reply with quote

Ok, I feel MUCH better now. Check this out...
Code:

$ qpkg -f /bin/tar
app-arch/tar *
$ qpkg -f /usr/bin/tar
app-arch/star *


Root was using /bin/tar (tar) and other users (like me) /usr/bin/tar (star). This all has to so with $PATH.

This explains why sometimes -c worked and sometimes I just had to use c. I guess one way to fix this is to remove either star or tar. I just don't know which one :roll:
Back to top
View user's profile Send private message
seltrus
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 102

PostPosted: Mon Nov 22, 2004 3:48 am    Post subject: Reply with quote

manny15 wrote:
I guess one way to fix this is to remove either star or tar. I just don't know which one :roll:


I would remove star. I would rather have something maintained by GNU than have something that is supposed to be the fastest tar available. Most CPU time is spent in the compression phase (gzip, bzip2) anyway.
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Wed Nov 24, 2004 11:42 am    Post subject: Reply with quote

i have noticed this too, and i don't have 'star' emerged. with the latest version of tar (1.14.90-r1), i can't get --exclude to work. Going back to 1.14 it works fine.
Back to top
View user's profile Send private message
M4554KK3R
n00b
n00b


Joined: 15 Feb 2004
Posts: 34
Location: Hamburg

PostPosted: Wed Dec 01, 2004 10:12 am    Post subject: Reply with quote

isn't the syntax
Quote:
--exclude=foo
?
Back to top
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Wed Dec 01, 2004 11:48 am    Post subject: Reply with quote

it is

Code:

--exclude=pathorpattern


but it wouldn't work for me with the latest version
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum