Page 1 of 1

Data Migration

PostPosted: Mon Jan 07, 2013 12:51 pm
by gattaba
hello,
I want to know how I can export the contents of the remote database to VICIDIAL database .
and this export will be in the table vicidial_list.
is that it is possible to do it automatically and how?.
thank you in advance

Goautodial 2.0
Vicidial
VERSION: 2.2.1-237
BUILD: 100510-2015
Asterisk-1.4.27.1-1
Vtiger version 5.1.0
Centos 6.3
digium card : TE122

Re: Data Migration

PostPosted: Mon Jan 07, 2013 2:13 pm
by williamconley
I'm not sure what you are asking. Do you intend to copy from one vicidial to another vicidial? or do you want to import lead records?

both are possible, but they are completely different operations.

Importing from one vicidial to another is easy if you are overwriting the vicidial list table AND if the two machines have the exact same version. If you want to add records from one to the other, it is more complex.

If you merely want to import records from a non-vicidial database into Vicidial, you would do best to use the command line lead loader. It resides in /usr/share/astguiclient.

perl VICIDIAL_IN_new_leads_file.pl --help

That will give you the available options for import.

Re: Data Migration

PostPosted: Wed Jan 09, 2013 7:09 am
by gattaba
thanks
I actually want to import leads but they are on a remote database under myslq. is that I can import automatically in regular intervals

Re: Data Migration

PostPosted: Wed Jan 09, 2013 11:44 am
by williamconley
Simplest method: Create a script on the remote mysql server which can create a file in a local ftp location. then use VICIDIAL_IN_new_leads_file.pl to acquire and import the leads. Using crontab on both machines will allow this to be automated.

Another fairly simple method: use a script on the remote system (timed execution with crontab) to grab each lead from mysql and push the lead into Vicidial with the non-agent api. Documentation for the non-agent api is in /usr/src/astguiclient/trunk/docs

While it is possible to perform a direct mysql-to-mysql data migration, the likelihood that you will introduce errors is very high. These two import scripts are designed to refuse invalid records along with properly configuring each record (such things as time zone and deduping ...).