[lug] tar and symlinks

j davis davis_compz at hotmail.com
Mon Oct 28 23:21:10 MST 2002

>Tar seems to be able to handle sym-links:
>    guin:tmp$ mkdir tarfoo
>    guin:tmp$ cd tarfoo
>    /tmp/tarfoo
>    guin:tarfoo$ date >file
>    guin:tarfoo$ ln -s file symlink
>    guin:tarfoo$ tar c . | tar xvv
>    drwxr-xr-x jafo/jafo         0 2002-10-28 22:06:54 ./
>    -rw-r--r-- jafo/jafo        29 2002-10-28 22:06:45 ./file
>    lrwxrwxrwx jafo/jafo         0 2002-10-28 22:06:54 ./symlink -> file
>    guin:tarfoo$
>I presume that there were errors while restoring the tar which said why
>the symlinks weren't getting restored, but that you didn't notice or
>pass them on in your message...

i only had problems with symlinks outside of the dir i was taring...
symlinks inside /etc linking to another place in /etc are intact.
I think your example above does not meet the senario that caused the link
from /etc/aboot.conf to /boot/etc/aboot.conf to break.And as for any 
output... http://www.taproot.bz/tar.html , i didn't see any to standard out
or messages.Could i issue -h with tar to do my backups, the just restore
and not have to recreate symlinks?

jd at taproot.bz

Get faster connections -- switch to MSN Internet Access! 

More information about the LUG mailing list