Messages in this thread | | | Date | Sat, 9 Mar 1996 09:34:30 -0600 (CST) | From | Bill Powers <> | Subject | Re: Duplicating a file system |
| |
On Fri, 8 Mar 1996, Joel Young wrote:
> This may not be best, but it works for me: > > say other partition is on mount, > > cp -a / /mnt > > you may want to do it at one level further down. > ie cp -a /bin /mnt > > > To create all of the > same identical devices I used the technique of backing up the /dev > directory with taper and then restoring the dev directory onto the new > drive. This takes about 5 minutes tops (back up to a file, not to the > tape). > > > > I have two SCSI hard drives. The first drive has a linux ext2fs filesystem on > > it, the second has an empty partition. They are different sizes. Can I just > > do `dd if=/dev/sda1 of=/dev/sdb1'? Or will the filesystem get corrupted that > > way? What is the best way to duplicate a filesystem to a different sized > > partition? > >
This will also work: Assuming the partitions are mounted as /From/Dir and /To/Dir:
(cd /From/Dir ; tar cf - . ) | (cd /To/Dir ; tar xvfp - )
Bill Powers wepprop@nettap.com Linux: Resistance is futile...
| |