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

Re: Transfering system.



Mike Wood <mike@lostboy.okinternet.com> writes:

> bring the system down to single user mode and mirror/copy(how?) the
> entire system onto the new partitions

There are many ways, but I'd suggest (assuming that you have the new
partition mounted on /mnt, and assuming that you want the entire old
drive on that partition)

su
cd /
find -not -regex "^\./proc/.* -not -regex "^\./mnt/.*" | afio -p /mnt

This should get the entire contents of the old drive onto the
partition mounted on mnt.  Note that it will handle devices, links,
timestamps, the works.  The only thing that I know of that might not
be captured perfectly is the timestamps on the directories.

If you don't want to cross file system boundaries, add the -xdev flag
to the find command.  If you need to get a different set of files,
just modify the find command to get the ones you want.

If you want to list the files being copied, just add the -v flag to
the afio command.  And of course, if you want to make sure you're
getting the right files before actually running the command, just use
/dev/null in place of /mnt, or just use less in place of the afio
command.

Anyone please correct me if I've gotten the command wrong.  I wouldn't
want someone running something broken as root...

--
Rob



Reply to: