Page 1 of 1
New Server, How do I transfer DNC list from old server?

Posted:
Wed Apr 29, 2009 12:19 pm
by TritenTech
HI,
We just upgraded our server and upgraded to the new 2.0.5. The only thing important to me to get off the old server and bring to the new is our internal DNC list. What is the easiest way for me to transfer it over to the new server? Thanks in advance.

Posted:
Wed Apr 29, 2009 12:39 pm
by ticoit
Did you upgraded the database tables as well?

Posted:
Wed Apr 29, 2009 6:52 pm
by TritenTech
We did a complete fresh install of the vicibox. So it loads all the new asterisk and vici together.

Posted:
Wed Apr 29, 2009 11:31 pm
by mikefink80
I would think the easiest way would be to export the list of numbers from the vicidial_dnc table to a sql or csv file from your old server and import it into your new servers vicidial_dnc table. If you have phpmyadmin setup on your old server it should be easy to do.

Posted:
Thu Apr 30, 2009 12:33 am
by jjohnson78
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.

Posted:
Thu Apr 30, 2009 1:16 am
by williamconley
Are you saying you "upgraded your server" (2.0.4 to 2.0.5 on the existing server) or you "installed vicibox on another server" (2.0.5 where there was NO vicidial before, but you still have the OLD server at 2.0.4 with data on it)?