Remo Mattei wrote:
<snip>
Export one domain from mysql to another
I tried this:
 
mysqldump -p -B vpopmail -t vpopmail -w pw_domain="mastroraphael.com"
<snip>

-- Dumping data for table `dir_control`
--
-- WHERE:  pw_domain=mastroraphael.com
 

mysqldump: Got error: 1054: Unknown column 'pw_domain' in 'where clause' when retrieving data from server
 
This would be because you didn't read the mysql dump man page. -t says not to write create info, --tables specifies a table. Also of note, -B is for MULTIPLE databases, not one.
 
 
but no luck.
 
Thanks, again,
 
REMO
You want:
mysqldump -u <user> -p vpopmail --tables vpopmail -w pw_domain="mastroraphael.com"

However the vconvert method other people have suggested looks significantly safer and easier.
Also, don't forgot to insure that the path to the user mailbox remains EXACTLY the same on the new box.
You'll also want to dump the dir_control table entry for this domain so that vadduser and whatnot create people in the right place.
Hope that helps,
Nick Harring
Webley Systems

Reply via email to