by jjohnson78 » Thu Apr 30, 2009 12:33 am
It's really easy to do if you use mysqldump. I think this should work (did for me, anyway - logged in as root):
On the old server:
$ mysqldump asterisk vicidial_dnc --no-create-info --insert-ignore > dnc_export.sql
This will write the data from the old vicidial_dnc table out to a "dnc_export.sql" file as a bunch of "INSERT IGNORE" statements, which is useful if you already have any data in the vicidial_dnc table on the new server. It will also leave out commands to drop the vicidial_dnc table and create it again from scratch, which you shouldn't need to do either.
Move the dnc_export.sql file to the new server, and execute this, where <filepath> is the location where you put the dnc_export.sql file on the new server:
$ mysql asterisk < <filepath>/dnc_export.sql
This was all I needed to do for mine, since the vicidial_dnc table's schema has stayed pretty constant over all Vicidial versions, as far as I know; just one column "phone_number". If the vicidial_dnc table is large, you may want to optimize it after you do this if there's not a lot of activity on the new server at that moment.