lkml.org 
[lkml]   [1996]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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...




\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.137 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site