Subject: Transfering system.

From: Mike Wood <[email-masked]>
Date: Wed, 28 Aug 1996 10:36:30 -0700

Hello, I am running a mailserver for our network on a Debain 1.1
system.  I now need to upgrade the hard drive.  Is there a way I can do this
quick and painless?  Perhaps down the server and intsall the new drive.
Bring the server back up and fdisk and format the new drive, bring the
system down to single user mode and mirror/copy(how?) the entire system onto
the new partitions, remove the old drive, boot with a bootdisk, and re-run LILO?

                                thnx in advance,
                                                  mike...

---

From: [email-masked]
Date: Wed, 28 Aug 1996 14:13:55 -0500 (CDT)

> the new partitions, remove the old drive, boot with a bootdisk, and re-run LILO?

	Pretty much, that's how I've done it.  The copy/mirror can be done several
ways.  the one I prefer for simplicity is 'cp -a'. Another way I've seen it done
involves tar and pipes.  The hardest part about that is that you have to make sure
it sets the permissions and users correctly on the second command.  Hope this helps.

					Mike Mattice

---

From: Rob Browning <[email-masked]>
Date: 28 Aug 1996 14:25:38 -0500

Mike Wood <[email-masked]> 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