On 06/24/2010 11:40 PM, Eric Shubert wrote:
Pablo Gonzalez wrote:
Hello all, would like to know what steps should I consider to support
my users vpopmail of qmailtoaster and then restore on another machine.
I am qmailrocks user I want to migrate to qmailtoaster there any tool
or script to migrate users vpopmail without mysql to another
qmailtoaster server with vpopmail with mysql?
thanks for your advice and experience.
Pablo
---------------------------------------------------------------------------------
See
http://wiki.qmailtoaster.com/index.php/Migrating_from_non-toaster_qmail
The qtp-backup and qtp-restore scripts are part of the
qmailtoaster-plus package, which you can obtain at
http://qtp.qmailtoaster.com/. They can take care of the lion's share
of the migration, but you'll need to handle the user accounts in some
other fashion. I think there might be some script in the list archives
for mass adding users.
Please document your experience on the wiki page above if you can. It
could use a little improvement.
I did this a couple years back for a company, and I still have a couple
of the scripts I used.
You need to get a list of the users and their password in a text file,
but then can easily import them using something like this"
#!/bin/sh
N=0
cat $1 | while read LINE ; do
N=$((N+1))
/home/vpopmail/bin/vadduser $LINE
done
That's assuming you've al;ready created the domain(s) on the new server.
The mail store structure should be the same, and depending on how many
domains you have this may help:
#!/bin/sh
domain=$1
if [ -d /home/vpopmail/domains/$domain ] ; then
echo "Domain exists in /home/vpopmail/domains !"
sleep 5
# Change ownership to what QMT needs
chown -R vpopmail:vchkpw $domain
for v in $domain/*; do
# Copy the cur mail files to the destination
find $v/Maildir/cur/ -type f | while read file
do
#echo cp "$file" /home/vpopmail/domains/$v/Maildir/cur/
cp -p "$file" /home/vpopmail/domains/$v/Maildir/cur/
done
# Copy the new mail files to the destination
find $v/Maildir/new/ -type f | while read file
do
#echo cp "$file" /home/vpopmail/domains/$v/Maildir/new/
cp -p "$file" /home/vpopmail/domains/$v/Maildir/new/
done
done
fi
if [ -d /home/vpopmail/domains/0/$domain ] ; then
echo "Domain exists in /home/vpopmail/domains/0 !"
sleep 5
# Change ownership to what QMT needs
chown -R vpopmail:vchkpw $domain
for v in $domain/*; do
# Copy the cur mail files to the destination
find $v/Maildir/cur/ -type f | while read file
do
#echo cp "$file" /home/vpopmail/domains/0/$v/Maildir/cur/
cp -p "$file" /home/vpopmail/domains/0/$v/Maildir/cur/
done
# Copy the new mail files to the destination
find $v/Maildir/new/ -type f | while read file
do
#echo cp "$file" /home/vpopmail/domains/0/$v/Maildir/new/
cp -p "$file" /home/vpopmail/domains/0/$v/Maildir/new/
done
done
fi
These are a few years old, but may get you on the right track.
---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group
(www.vickersconsulting.com)
Vickers Consulting Group offers Qmailtoaster support and installations.
If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
Please visit qmailtoaster.com for the latest news, updates, and packages.
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]