Restore database backup

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Restore database backup

Postby fran125 » Thu Dec 18, 2014 5:49 am

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.
fran125
 
Posts: 10
Joined: Wed Sep 24, 2014 2:41 pm

Re: Restore database backup

Postby mflorell » Thu Dec 18, 2014 6:03 am

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
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Restore database backup

Postby actiondave » Wed May 27, 2015 9:08 pm

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 ?
New Setup:Vicibox Redux.x86 64-4.0.3
Database/Webserver - Asus KFSN4-DRE/SAS | 2x AMD Opteron 2356 Quad Core |8GB RAM

Telephony Server: HP Proliant DL380 G5 - 2x 2.5GHz Xeon Quad Core - 16GB RAM

Archive Server - 1.7GHz (recordings)
actiondave
 
Posts: 63
Joined: Mon Jun 20, 2011 9:46 pm

Re: Restore database backup

Postby paolo » Thu May 28, 2015 10:21 am

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
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
paolo
 
Posts: 48
Joined: Wed Oct 08, 2014 11:38 am

Re: Restore database backup

Postby gservices » Wed Jun 22, 2016 3:41 am

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,
Vicibox_v.6.0.x86_64-6.0.4| Vicidial 2.12b0.5 | SVN :2553 | Asterisk 1.8.32.3| 4 Servers | WORKSTATION Z400
ViciBox.x86_64-4.0.2.iso | Vicidial 2.6-393a Build 130124-1721 | Asterisk 1.4.44 | Single Server | Intel(R) Core(TM)2 Duo
gservices
 
Posts: 54
Joined: Mon Mar 11, 2013 5:31 am

Re: Restore database backup

Postby mflorell » Wed Jun 22, 2016 6:39 am

MySQL and MariaDB are interchangeable, they even have the same script names.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Restore database backup

Postby gservices » Wed Jun 22, 2016 9:31 am

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.
Vicibox_v.6.0.x86_64-6.0.4| Vicidial 2.12b0.5 | SVN :2553 | Asterisk 1.8.32.3| 4 Servers | WORKSTATION Z400
ViciBox.x86_64-4.0.2.iso | Vicidial 2.6-393a Build 130124-1721 | Asterisk 1.4.44 | Single Server | Intel(R) Core(TM)2 Duo
gservices
 
Posts: 54
Joined: Mon Mar 11, 2013 5:31 am

Re: Restore database backup

Postby williamconley » Thu Jun 23, 2016 2:25 pm

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?).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Restore database backup

Postby gservices » Fri Jun 24, 2016 3:52 am

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
Vicibox_v.6.0.x86_64-6.0.4| Vicidial 2.12b0.5 | SVN :2553 | Asterisk 1.8.32.3| 4 Servers | WORKSTATION Z400
ViciBox.x86_64-4.0.2.iso | Vicidial 2.6-393a Build 130124-1721 | Asterisk 1.4.44 | Single Server | Intel(R) Core(TM)2 Duo
gservices
 
Posts: 54
Joined: Mon Mar 11, 2013 5:31 am

Re: Restore database backup

Postby williamconley » Tue Jun 28, 2016 3:30 pm

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
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Restore database backup

Postby mattyou1985 » Thu Aug 04, 2016 9:51 am

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 ?
mattyou1985
 
Posts: 111
Joined: Tue Apr 19, 2016 3:30 pm

Re: Restore database backup

Postby williamconley » Wed Aug 10, 2016 10:13 pm

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).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: fido, Google [Bot] and 134 guests