Upgrade Procedure - 8.1.2 to 9.0.0

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

Upgrade Procedure - 8.1.2 to 9.0.0

Postby Arffeh » Tue Oct 29, 2019 8:28 pm

Hi,

I was hoping someone can sanity-check my migration procedure from vicibox 8.1.2 to 9.0.0 .

The installation is an all-in-one, single-server config with no major changes outside of the web interface.

I tested this in a VM and seems to have worked, for the most part.


FROM:
vicibox 8.1.2 | VERSION: 2.14-714a | BUILD: 190628-1511 | SVN 3121 | asterisk 13.24.1-vici | DB schema 1572

TO:
vicibox 9.0.0 | VERSION: 2.14-721a | BUILD: 191015-1620 | SVN 3149 | asterisk 13.27.0-vici | DB schema 1577


Code: Select all

# Initial setup for timezone, lan, and setting hostname to same as old server hostname
vicibox-timezone
yast lan
reboot

# Install opts as single-server
vicibox-install

# Remove current database
mysql
> DROP DATABASE asterisk;
> CREATE DATABASE asterisk;

# Dump old DB into mysql
gunzip asterisk_backup.sql.gz
mysql < asterisk_backup.sql

# Hunt through the schema to find schema version 1572, run all queries after that point to get up to 1577
cat /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql
mysql
> USE asterisk;
> *run all required queries*

# Use server IP script as a shortcut to rewrite all old IP entries
/usr/share/astguiclient/ADMIN_update_server_ip.pl

# Manually update the audio store info, as the folder/IP changed.
# Manually update the new environment variables for consistency.
mysql
> USE asterisk;
> UPDATE system_settings SET sounds_webserver='new.ip.goes.here', sounds_web_directory='fA5snFkjdIoqAprOdkRd57gsQkd'
> UPDATE `servers` SET `asterisk_version` = '13.27.0-vici';
> UPDATE system_settings SET svn_revision='3149';
> UPDATE servers SET svn_revision='3149',svn_info='/usr/src/astguiclient/trunk
Path: .
Working Copy Root Path: /usr/src/astguiclient/trunk
URL: svn://svn.eflo.net/agc_2-X/trunk
Relative URL: ^/agc_2-X/trunk
Repository Root: svn://svn.eflo.net
Repository UUID: 3d104415-ff17-0410-8863-d5cf3c621b8a
Revision: 3149
Node Kind: directory
Schedule: normal
Last Changed Author: mattf
Last Changed Rev: 3149
Last Changed Date: 2019-10-21 04:42:33 +1100 (Mon, 21 Oct 2019)


';


After this, I went into Servers->"server" and set "Rebuild conf files", "Rebuild Music On Hold" and "Sounds Update" to Y, waited 5 minutes and rebooted.


Everything SEEMS like it worked, but I get the feeling I've probably missed something.

I feel like this may be the error prone, "long way" to do a migration. Just thought I'd check here before doing this over the weekend.

I also feel like `system_settings`.`version` should be updated, but I'm not sure what it should be updated to. The old one is 2.14b0.5, which doesn't correspond to the old "version" written in the bottom left of the admin interface, so I'm led to believe the value comes from somewhere else.

If there are any "gotchas" I've overlooked, or if there's anything special that needs to be done for the jump from moving it from openSUSE 42.3 to 15.1, the feedback would be appreciated.
Arffeh
 
Posts: 29
Joined: Wed Mar 26, 2014 7:53 pm

Re: Upgrade Procedure - 8.1.2 to 9.0.0

Postby Kumba » Thu Nov 07, 2019 2:57 pm

Here's how I would approach it from a somewhat higher level overview:

1 - Backup old system including a database dump, recordings, voicemail, asterisk configs for reference, crontab entries for reference, and audiostore/web directory.
2 - Install ViciBox v.9.0 as normal like it was a brand new non-legacy setup, so let vicibox-express run as normal and verify it all came up correctly
3 - Import the backed up database (overwriting tables, dropping db and recreating it, whatever works in your situation)
4 - Do an SVN upgrade on the database so it matches the installed SVN code (as a general rule if I'm doing this much work, you're getting an SVN upgrade too)
5 - If the IP on the server is different now, run the IP change script /usr/share/astguiclient/ADMIN_update_server_ip.pl
6 - Run /usr/src/astguiclient/trunk/install.pl and just hit enter to everything so it can take care of any of the system settings it needs
7 - Copy your backup voicemails back to the server
8 - Copy the files from your old audio store into the new audiostore directory (less moving parts this way), then update the audio store directory in the database
9 - Copy any custom/modified crontab entries from the backed up crontab into the new system, like automated backups or special config settings
10 - Copy the backed-up recordings onto the server
11 - Go through Admin --> System Settings and make sure things like external IP, etc, are set correctly.

If you are installing on a new server, you can just re-ip the old server to get it out of the way and install the new server with the old one's IP. That way you don't have to re-do firewall rules, change book marks, retrain agents, etc etc. All the system settings and everything else should be fine with this method. This also has the added benefit that if something goes horribly wrong and the new server doesn't work, you can just re-ip the old server back to it's original IP and continue on like nothing happened. It's what I call a parallel upgrade.
Kumba
 
Posts: 939
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 56 guests