Page 1 of 1

Restore database backup

PostPosted: Thu Dec 18, 2014 5:49 am
by fran125
Hello forum,

I am testing backup and restore a database. Procedure:

1º-./ADMIN_backup.pl --db-only
2º- Reinstall and configure a new machine, same OS version, vicidial version..
3º- drop database asterisk -- create database asterisk -- mysql asterisk < database.sql
4º-perl /usr/src/astguiclient/trunk/install.pl

Next, I try log in admin panel and It always asks again user/pass..

Why it does not work?

Regards.

Re: Restore database backup

PostPosted: Thu Dec 18, 2014 6:03 am
by mflorell
Here is how we recommend doing a restore onto a fresh vicibox install:

Backup Process:
- /usr/share/astguiclient/ADMIN_backup.pl --help (to see options)
- /usr/share/astguiclient/ADMIN_backup.pl --without-web –debugX

Restore Process:
- ls -lat /var/log/astguiclient/archive/
- cd /var/log/astguiclient/archive/
- tar xvfz 192.168.1.5_ALL_0.tar.gz
- cd var/log/astguiclient/archive/
- mv 192.168.1.5* /
- cd /
- ls -lat
- tar xvf 192.168.1.5_VOICEMAIL_0.tar
- tar xvf 192.168.1.5_CONF_0.tar
- tar xvf 192.168.1.5_BIN_0.tar
- tar xvf 192.168.1.5_LINUX_0.tar
- tar xvf 192.168.1.5_SOUNDS_0.tar
- (check for other tar files if you used other backup options)
- gunzip 192.168.1.5asterisk0.gz
- mysql asterisk
- \. 192.168.1.5asterisk0
- quit

Re: Restore database backup

PostPosted: Wed May 27, 2015 9:08 pm
by actiondave
I have a backup from ViciBox Redux v.4.0.3 and just installed ViciBox Redux v.6.0.3-14118 on a new server.

Can the backup from 4.0.3 be restored on the new server with 6.0.3 ?

Re: Restore database backup

PostPosted: Thu May 28, 2015 10:21 am
by paolo
HI,

When I do a DB restore one of the steps I do is

upgrade the sql version (reference: http://wiki.vicidial.org/index.php/SVN:howto)
Note: since we are only upgrading the database cat the upgrade in cd /usr/src/astguiclient/trunk/extras/
and follow the SQL upgrade instruction

then run the /usr/share/astguiclient/ADMIN_update_server_ip.pl after the sql upgrade

Re: Restore database backup

PostPosted: Wed Jun 22, 2016 3:41 am
by gservices
Hello,
I have vicidial from vicibox v3 all in one, intalled on 2012 with vicibox-express and now I create cluster with vicibox 6.0.4
I backup the database --db-only from old server, and restore on new database server in cluster.
All the process be done and I find my users on vicidial_users But I can't log In, I controll astguiclient.conf and are OK

Is this problem from that new server with vici 6.0.4 has mariaDB and old has mysql,

Re: Restore database backup

PostPosted: Wed Jun 22, 2016 6:39 am
by mflorell
MySQL and MariaDB are interchangeable, they even have the same script names.

Re: Restore database backup

PostPosted: Wed Jun 22, 2016 9:31 am
by gservices
what is the problem, because I restore again the default database of server cluster v6.0.4, that I backup first I restore the old database, and is OK with the default DB.

Re: Restore database backup

PostPosted: Thu Jun 23, 2016 2:25 pm
by williamconley
When you restored the DB "ONLY", you now have a database schema that does not match the Vicidial software on the server.

Either backup and restore Everything or upgrade the DB (UPGRADE instructions in /usr/src/astguiclient/trunk).

You'll also likely need to run the IP update script since the old/new servers may not have the same IP address and perhaps modify the "sip.conf" value for "externip" if you bring along the sip.conf file from the previous server.

You'll also likely need to edit the values in admin->servers->choose your server. Some of these values may be based on the previous installation (such as the asterisk version?).

Re: Restore database backup

PostPosted: Fri Jun 24, 2016 3:52 am
by gservices
Thank you william.
After I restore the DB, I try change the IP.
But I can not login in admin vicidial. I see all the db table and try some users to log in but nothing.
I will try again to restore the Db and post the problem here.
thank you

Re: Restore database backup

PostPosted: Tue Jun 28, 2016 3:30 pm
by williamconley
From the splash screen via ssh or console:
Code: Select all
To change the server IP in the database type:
/usr/share/astguiclient/ADMIN_update_server_ip.pl

Re: Restore database backup

PostPosted: Thu Aug 04, 2016 9:51 am
by mattyou1985
mflorell wrote:Here is how we recommend doing a restore onto a fresh vicibox install:

Backup Process:
- /usr/share/astguiclient/ADMIN_backup.pl --help (to see options)
- /usr/share/astguiclient/ADMIN_backup.pl --without-web –debugX

Restore Process:
- ls -lat /var/log/astguiclient/archive/
- cd /var/log/astguiclient/archive/
- tar xvfz 192.168.1.5_ALL_0.tar.gz
- cd var/log/astguiclient/archive/
- mv 192.168.1.5* /
- cd /
- ls -lat
- tar xvf 192.168.1.5_VOICEMAIL_0.tar
- tar xvf 192.168.1.5_CONF_0.tar
- tar xvf 192.168.1.5_BIN_0.tar
- tar xvf 192.168.1.5_LINUX_0.tar
- tar xvf 192.168.1.5_SOUNDS_0.tar
- (check for other tar files if you used other backup options)
- gunzip 192.168.1.5asterisk0.gz
- mysql asterisk
- \. 192.168.1.5asterisk0
- quit



i need to do this ^

so will this do a full backup and restore without-web ?

Re: Restore database backup

PostPosted: Wed Aug 10, 2016 10:13 pm
by williamconley
mattyou1985 wrote:
mflorell wrote:Here is how we recommend doing a restore onto a fresh vicibox install:

Backup Process:
- /usr/share/astguiclient/ADMIN_backup.pl --help (to see options)
- /usr/share/astguiclient/ADMIN_backup.pl --without-web –debugX

Restore Process:
- ls -lat /var/log/astguiclient/archive/
- cd /var/log/astguiclient/archive/
- tar xvfz 192.168.1.5_ALL_0.tar.gz
- cd var/log/astguiclient/archive/
- mv 192.168.1.5* /
- cd /
- ls -lat
- tar xvf 192.168.1.5_VOICEMAIL_0.tar
- tar xvf 192.168.1.5_CONF_0.tar
- tar xvf 192.168.1.5_BIN_0.tar
- tar xvf 192.168.1.5_LINUX_0.tar
- tar xvf 192.168.1.5_SOUNDS_0.tar
- (check for other tar files if you used other backup options)
- gunzip 192.168.1.5asterisk0.gz
- mysql asterisk
- \. 192.168.1.5asterisk0
- quit



i need to do this ^

so will this do a full backup and restore without-web ?

"Full" <-- > "without-web" ... this is contradictory.

This will back up and restore all the files listed. Full is subjective (note the "check for other tar files if you used other backup options), and of course the "without web" notation specifies "not full". It will also not back up client audio files. And probably not voicemail (check the options when running the backup file with --help for other missing items).

And remember, please, that this is not a portable backup/restore. It's designed for backup and restore onto the same machine only. A different version of OpenSuSE or a different IP address will need more work.

This method is useful if you think you may have altered something you shouldn't have (or someone stupid did so without your permission, LOL).

It's also useful for those who create a Drive Image and then push these backups off to an FTP server. If the HD dies, you re-create the drive from the Drive Image and then use this process to restore and you're back in business. Except for the missing web files.( And any other 'tar' files based on your options during the backup, and definitely not client audio files).