From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 13484 invoked from network); 9 Feb 2000 09:03:49 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 9 Feb 2000 09:03:49 -0000 Received: from server1.software-ag.de (server1.software-ag.de [193.26.194.2]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id EAA30471 for ; Wed, 9 Feb 2000 04:03:46 -0500 Message-ID: <38A12DCA.7EA2783D@sql.de> Date: Wed, 09 Feb 2000 10:05:14 +0100 From: Joerg Bruehe X-Mailer: Mozilla 4.6 [de]C-CCK-MCD QXW0321s (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Copying partitions? References: <012801bf7272$3615f4b0$2208a8c0@softwareag.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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