From: mortimer () physics ! uq ! oz ! au
To: tru64-unix-managers
Subject: Copying file systems.
Date: Mon, 24 Jun 1996 23:25:13 +0000 [thread overview]
Message-ID: <96076333621542.tru64-unix-managers.marc@archive.invalid> (raw)
Hi
I recently had to copy a complete file system from one disk
to another. Naively I first tried `cp -pR`. As you probably
realize this didn't work. Specifically, in order of increasing
seriousness:
o Directories had their modification times set to the
time of copying rather than the same time as the source.
o Files with the sticky bit set on the source did not have
the sticky bit set on the destination.
o Symbolic links were recreated as promised by the -R option
but they had the wrong owner:group set. All recreated
symbolic links had root:system as owner:group.
With the help of the archives for this mailing list I discovered
that the correct way to copy a complete file system was with dump
and restore. Specifically
dump -0f - file_system | (cd /mnt; restore -vrf -)
does what I wanted.
My problem is that I sometimes need to move a user's area from
one disk to another. Since this is only part of a file system
I can't use dump and restore although I suppose I could use tar
in a similar way.
Why doesn't `cp -pR` work the way I expected. Is this a bug with
cp (we are running OSF1 v3.2 214) or is it supposed to work this way.
Ian Mortimer
Department of Physics Tel : +61 7 3365 3416
University of Queensland Email: mortimer@physics.uq.edu.au
St. Lucia, Brisbane Fax : +61 7 3365 1242
Queensland, Australia. 4072.
Disclaimer: Any opinions expressed are my own and do not represent those
of the University of Queensland or the Department of Physics.
reply other threads:[~1996-06-24 23:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox