RE: Copying a file system w/ tar - symbolic links not copied right.




-----Original Message-----
From: owner-freebsd-questions@xxxxxxxxxxx
[mailto:owner-freebsd-questions@xxxxxxxxxxx] On Behalf Of
Andy Greenwood
Sent: Thursday, 11 May 2006 11:24 AM
To: Don O'Neil
Cc: freebsd-questions@xxxxxxxxxxx
Subject: Re: Copying a file system w/ tar - symbolic links
not copied right.

# man tar

specifically, the -L option

On 5/10/06, Don O'Neil <don@xxxxxxxxxxxxxx> wrote:
Hi all...

I'm trying to move a file system from one disk to another,
and when I
do
this:

tar cf - /source/* | ( cd /destination && tar xfv - )

It copies all the files, but the symbolic links are copied
as files of
0 length, rather than re-established as links.

What am I doing wrong here, or is my tar broken?


to preserve symlinks you need to use cpio specifically the -p and -l
options

man cpio

It is a bit of a read ....


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: mtaylor@xxxxxxxxxxxxxxxx

--
"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
Albert Einstein
--
---------------------------------------------------------------
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material.

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---------------------------------------------------------------

***This Email has been scanned for Viruses by MailMarshal.***
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages