[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: How to migrate a Debian system to another hard drive?



On 11:20:51 Tim Egbert wrote:
>>Is there a simple way to migrate a Debian system to another hard drive?
>
>On our Debian system, we have two hard drives.  The primary drive has the
>root directory and swap partition and is bootable.  It also contains the
>various Debian software packages, programs, libraries, etc.  The second
>drive just has the /home directory tree. 
>
Tim,
This question of replicating a filesystem is one that comes up often.  I use
cpio to do this, and so far its been flawless for me.  It creates an exact 
duplicate of a filesystem, and the following command preserves file access
times, symlinks, etc.  Works nice, and its simple.  Just cd to the root of the
filesystem you wish to duplicate, and issues the following command:

# find . -depth | cpio -pdmv /target_directory

This is based on cpio's "pass thru" mode.  Everything appearing on stdin
goes to stdout....

Paul



Reply to: