From: Joerg Bruehe <joerg@sql.de>
To: axp-list@redhat.com
Subject: Re: Copying partitions?
Date: Wed, 09 Feb 2000 10:05:14 +0100 [thread overview]
Message-ID: <38A12DCA.7EA2783D@sql.de> (raw)
In-Reply-To: 012801bf7272$3615f4b0$2208a8c0@softwareag.com
Hi !
Franklin Hooker schrieb:
>
> Why can't I use the following technique to copy
> disk partitions?
>
> dump -0 -f - /dev/sdb2 | (cd /mnt/disk; restore yrf -)
I do not know - the command looks o.k. to me.
However, I always prefer "cpio" for such a task:
cd $SOURCE
find . -print | cpio -pdmav $DESTINATION
For me, that never failed - and it is not restricted to
doing it on complete file systems. However, it may expand
"sparse files" AFAIK.
Notes:
1) You can easily add a qualification to "find" to restrict
that to only files (create needed directories implicitly)
or only directories (create identical, but empty structure)
or with a "mtime" option or ...
2) You can easily insert a filter ("grep", "fgrep", "sed", ...)
between "find" and "cpio" to exclude un-wanted files
(core dumps, backup versions, ...)
3) On some platforms (sorry - no list, but HP-UX may be one),
"cpio" does not support the simultaneous use of the flags
"m" (= set modification time of destination to that of source,
not to time of copy) and
"a" (= reset access time of source to original value before
copying).
In that case, you have to decide which one you want more.
Regards,
Joerg Bruehe
--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
(speaking only for himself)
mailto: joerg@sql.de
next parent reply other threads:[~2000-02-09 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <012801bf7272$3615f4b0$2208a8c0@softwareag.com>
2000-02-09 9:05 ` Joerg Bruehe [this message]
2000-02-08 21:16 Copying partitions? Franklin Hooker
-- strict thread matches above, loose matches on Subject: below --
2000-02-08 20:12 Franklin Hooker
2000-02-08 20:45 ` Sean Hunter
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