[prev in list] [next in list] [prev in thread] [next in thread] 

List:       debian-user
Subject:    Re: tar command and -X -T options.
From:       Franco Martelli <martellif67 () gmail ! com>
Date:       2013-03-29 19:20:02
Message-ID: 5155E962.3040301 () gmail ! com
[Download RAW message or body]

> Hi,
> I'm on Debian Squeeze 6.0.7 amd64, I always used tar command for my
> backups using a couple of file to include and exclude directories.
> Now something strange it happens:
> (username) means the name which it's used to login to the system.
>
> root@mitas:~# tar --version
> tar (GNU tar) 1.23
> root@mitas:~# tar zcpf /tmp/bck.tgz -X out -T in
> root@mitas:~# cat out
> /home/(username)/linux-source-2.6.32
>
> root@mitas:~# cat in
> /home/(username)/linux-source-2.6.32/.config
>
> root@mitas:~# ls -l /tmp/bck.tgz
> -rw-r--r-- 1 root root 45 27 mar 15.33 /tmp/bck.tgz
>
> Tar command creates an empty bck.tgz file (45 bytes length) could
> anybody tell me why isn't .config file archive by tar?

Aren't you excluding it by what you have in file "out"?  (The pattern
to exclude is a superset of the pattern to include.)

It seems to work changing "out" file in this way:

root@mitas:~# cat out
/home/(username)/linux-source-2.6.32/\*

root@mitas:~# tar ztvf /tmp/bck.tgz
-rw-r--r-- (username)/(groupname)   55699 2013-03-29 15:51 home/(username)/linux-source-2.6.32/.config

but I've an /home/(username)/ entry in my "in" file that it will include
linux-source-2.6.32 subdirectory globally in bck.tgz  :-(

bye,

-- 
                                         Franco Martelli.


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/5155E962.3040301@gmail.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic