Migrating from VitalPBX 4 (Debian 11) to VitalPBX 4.5 (Debian 12)

Migrating from VitalPBX 4 to 4.5 follows a similar approach to the migration
process from version 3 to 4. Below is a detailed guide to help you complete
the migration process smoothly.

Debian 12 Server Preparation

  1. Set up a new server with a fresh installation of Debian 12.
  2. Install VitalPBX 4.5 by following the official installation instructions
    here.
  3. Install the same add-ons used on your current production server.
  4. Complete the wizard setup for the Sonata and VitXi modules. Use
    placeholder credentials during the setup; these will be replaced when
    the backup is restored.
  5. If OpenVPN is installed and configured on your existing server, install
    and configure it on the new Debian 12 server.

Actions on the Debian 11 Server

  1. Use the Backup and Restore module in VitalPBX to create a backup of
    your settings.
  2. For large CDR data and call recordings, transfer these manually
    (instructions below).
  3. Save the backup file to your local machine.
  4. Revoke the VitalPBX license(s) from your current production server.

Importing the Backup to VitalPBX 4.5 (Debian 12)

  1. Activate the necessary license(s) on the new server.
  2. Use the Backup and Restore module to import and restore the backup
    file.
  3. Run the following commands to ensure all settings are applied
    correctly
vitalpbx build-db
vitalpbx fully-gen-conf
  1. If the CDR and call recordings were migrated manually, execute the
    commands above after transferring the data.

Manually Moving Call Recordings and CDR Data
Call Recordings
To transfer call recordings from /var/spool/asterisk/monitor on the Debian
11 server to the same path on the Debian 12 server, run the following rsync
command on the Debian 12 server.

rsync -avz root@<Debian11_IP>:/var/spool/asterisk/monitor/ /var/spool/asterisk/monitor/

Replace <Debian11_IP> with the IP address of the Debian 11 server

CDR Data
To migrate CDR data from the Debian 11 server to the Debian 12 server follow
the steps below.

  1. Create a MySQL Backup on the Debian 11 server.
mysqldump -u root --add-drop-table --ignore-table=asterisk.cel asterisk > cdr_backup.sql
  1. Use SCP to transfer the backup file to the Debian 12
scp cdr_backup.sql root@<Debian12_IP>:/root/
  1. On the Debian 12 server, restore the database.
mysql -u root asterisk < /root/cdr_backup.sql

Post-Migration Testing

  1. Verify all settings, trunks, extensions, and modules.
  2. Test critical features like inbound/outbound calls, voicemail, and call
    recordings.
  3. Confirm that CDR data and call recordings are accessible and accurate.
1 Like