On Thu, Dec 05, 2002 at 10:07:41AM -0600, Nick Lomonte wrote:
> What I am planning on doing is stopping qmail, mounting the new drive,
> and doing the following:
> cd /home
> cp -a * /newdrive
> Does anyone see a problem with this?  Is there something I'm overlooking
> that would cause this to not work?

Some versions of cp don't properly chown ownership on symlinks.  Some
versions of cp only do utime and chmod updates after entire subdir
hierarchies are finished copying.  Most versions of cp will leave
partially copied files around if interrupted by ctrl-c.

If you have gigs of data and millions of files, cp may take too long to
run for your allotted window.  If you can be assured that cp will run to
completion in a relatively short period of time, you should be okay... but
if any of the above concerns are real to you, then I'd suggest using

rsync typically cannot easily handled millions of files (it does a full
scan before doing any work, building a list in memory), therefore you may
need to rsync domain by domain or even mailbox by mailbox for domains with
thousands of mailboxes.  This is usually easily managed with a list of
your email boxes and little scripting. 

rsync has the advantage that you can spend 8 hours doing the initial copy,
but then "sync" up the source and destination in minutes, thus allowing a
short migration window, and you can know beforehand that your new disk has
the data on it (and your inode counts and block sizes were chosen wisely).

I've migrated 14gig of data off of NT and onto unix with only about 2
minutes of downtime using this method.

Ted Deppner

Reply via email to