View previous topic :: View next topic |
Author |
Message |
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Sun Nov 07, 2004 6:12 pm Post subject: I think TAR changed :( (app-arch/tar-1.14.90-r1) |
|
|
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 |
|
|
etnoy Apprentice
Joined: 29 Aug 2003 Posts: 255 Location: Västerås, Sweden
|
Posted: Sun Nov 07, 2004 10:17 pm Post subject: |
|
|
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 |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Mon Nov 08, 2004 7:53 pm Post subject: |
|
|
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 |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Wed Nov 10, 2004 8:39 pm Post subject: |
|
|
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 |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Sun Nov 21, 2004 2:56 pm Post subject: |
|
|
Ahhh! I'm going to pull my hair out 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 |
|
Back to top |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Sun Nov 21, 2004 4:27 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
seltrus Tux's lil' helper
Joined: 24 Oct 2002 Posts: 102
|
Posted: Mon Nov 22, 2004 3:48 am Post subject: |
|
|
manny15 wrote: | I guess one way to fix this is to remove either star or tar. I just don't know which one |
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 |
|
|
markandrew Apprentice
Joined: 04 Feb 2004 Posts: 176 Location: Manchester, UK
|
Posted: Wed Nov 24, 2004 11:42 am Post subject: |
|
|
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 |
|
|
M4554KK3R n00b
Joined: 15 Feb 2004 Posts: 34 Location: Hamburg
|
Posted: Wed Dec 01, 2004 10:12 am Post subject: |
|
|
isn't the syntax ? |
|
Back to top |
|
|
markandrew Apprentice
Joined: 04 Feb 2004 Posts: 176 Location: Manchester, UK
|
Posted: Wed Dec 01, 2004 11:48 am Post subject: |
|
|
it is
Code: |
--exclude=pathorpattern
|
but it wouldn't work for me with the latest version |
|
Back to top |
|
|
|