Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 May 2006 12:00:54 +1000
From:      "Murray Taylor" <MTaylor@bytecraft.com.au>
To:        "Andy Greenwood" <greenwood.andy@gmail.com>, "Don O'Neil" <don@lizardhill.com>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: Copying a file system w/ tar - symbolic links not copied right.
Message-ID:  <04E232FDCD9FBE43857F7066CAD3C0F117C995@svmailmel.bytecraft.internal>

next in thread | raw e-mail | index | archive | help

> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org=20
> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of=20
> Andy Greenwood
> Sent: Thursday, 11 May 2006 11:24 AM
> To: Don O'Neil
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Copying a file system w/ tar - symbolic links=20
> not copied right.
>=20
> # man tar
>=20
> specifically, the -L option
>=20
> On 5/10/06, Don O'Neil <don@lizardhill.com> wrote:
> > Hi all...
> >
> >  I'm trying to move a file system from one disk to another,=20
> and when I=20
> > do
> > this:
> >
> > tar cf - /source/* | ( cd /destination && tar xfv - )
> >
> > It copies all the files, but the symbolic links are copied=20
> as files of=20
> > 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@bytecraft.com.au=20

--
"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."
=20 Albert Einstein=20
--=20
---------------------------------------------------------------
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.=20

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.***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04E232FDCD9FBE43857F7066CAD3C0F117C995>