Backing Up GUI Configuration: Difference between revisions
(Add troubleshooting section for GUI backups breaking GTID replication: document the Settings > System Configuration > Database > Extra parameters for mysqldump binary setting with --set-gtid-purged=OFF) |
(Add section on migrating alerts/reports between cloud tokens) |
||
| Line 796: | Line 796: | ||
* [[Mysql_master-slave_replication_hints|MySQL Master-Slave Replication Hints]] | * [[Mysql_master-slave_replication_hints|MySQL Master-Slave Replication Hints]] | ||
* [[Mysql_master-master_replication_hints|MySQL Master-Master Replication Hints]] | * [[Mysql_master-master_replication_hints|MySQL Master-Master Replication Hints]] | ||
== Migrating Alerts and Reports Between Cloud Tokens == | |||
This section describes how to transfer custom alerts, reports, dashboards, and other GUI configurations from one cloud token to another in the VoIPmonitor Cloud Service. | |||
=== Background: Each Cloud Token Has Its Own Database === | |||
In the VoIPmonitor Cloud Service, each cloud token is associated with a separate cloud database instance. When you switch to a new cloud token, your custom configurations (alerts, reports, dashboards) remain in the old database and are not automatically transferred to the new token. | |||
{{Note|Your custom alerts, reports, and other GUI configurations are stored in the cloud database. Switching cloud tokens means switching databases, which is why configurations appear missing after changing tokens.}} | |||
=== Migration Procedure Using Temporary Trial License === | |||
To migrate configurations from one cloud token to another, follow this step-by-step procedure: | |||
;Step 1: Contact VoIPmonitor Support | |||
* Contact VoIPmonitor support and request a temporary trial cloud license | |||
* Explain that you need to migrate configurations from an old cloud token to a new one | |||
* Support will create a temporary cloud license for you to use during this process | |||
;Step 2: Restore Old Cloud Database to Temporary License | |||
* Request that VoIPmonitor support restore a database backup from your old cloud token to this temporary trial license | |||
* Once complete, you will have temporary access to the old database containing your original configurations | |||
;Step 3: Access GUI with Temporary License | |||
* Log in to the VoIPmonitor Cloud GUI using your the temporary trial license credentials | |||
* Your original custom alerts, reports, and configurations should now be visible | |||
;Step 4: Export Configuration from Old Database | |||
* Navigate to '''GUI → Tools → Backup & restore''' | |||
* Select ''':backup GUI: configuration tables''' to back up all database settings | |||
* This includes alerts, reports, dashboards, users, sensors, and other GUI configurations | |||
* Download the generated configuration file | |||
;Step 5: Import Configuration to New License | |||
* Log in to the VoIPmonitor Cloud GUI using your new, permanent cloud license | |||
* Navigate to '''GUI → Tools → Backup & restore''' | |||
* Select ''':restore GUI: configuration tables''' | |||
* Upload and select the configuration file you downloaded from the temporary license | |||
{{Warning|1=Restoring will overwrite existing GUI settings in the new license. Only perform this if the new license has minimal or no customizations, or if you want to replace them with the old configurations.}} | |||
;Step 6: Restart All Sniffer Services | |||
After restoring the configuration, restart all sniffer services to force them to reload the updated configuration from the cloud database: | |||
<syntaxhighlight lang="bash"> | |||
# Restart the voipmonitor service | |||
systemctl restart voipmonitor | |||
# Verify the service is running | |||
systemctl status voipmonitor | |||
</syntaxhighlight> | |||
Your cloud sniffers should now be using the migrated configurations (alerts, reports, dashboards) from the old cloud token. | |||
=== Important Notes === | |||
* '''This requires VoIPmonitor support intervention''' - Only support can restore database backups to a temporary license | |||
* '''Contact support before switching tokens** - If you know you will be switching cloud tokens, consult with support about migration options before making the switch | |||
* '''Temporary license has a limited lifespan** - Complete the migration promptly while the temporary license is active | |||
* '''Alert-to-sensor assignments are NOT included** - After restoring, you may need to manually reassign alerts to specific sensors in the new GUI | |||
=== What Gets Transferred === | |||
The configuration tables backup includes: | |||
* Alert definitions and thresholds | |||
* Report definitions | |||
* Dashboard configurations | |||
* User accounts and permissions | |||
* Sensor definitions | |||
* Capture rules and filters | |||
* Custom GUI settings | |||
As noted in the [[#IMPORTANT:_What_IS_and_IS_NOT_Transferred|What IS and IS NOT Transferred]] section above, alert-to-sensor assignments and report-to-sensor assignments are not included in the backup and must be reconfigured manually after restoration. | |||
== AI Summary for RAG == | == AI Summary for RAG == | ||
'''Summary:''' Guide for backing up VoIPmonitor GUI configuration. Two methods: (1) '''GUI method''' via '''GUI → Tools → Backup & restore''' for one-time backups - select "configuration tables" and "configuration files". (2) '''CLI method''' using <code>backupGuiTables</code> command with cron for automated daily backups. Restoration via GUI or CLI (<code>restoreGuiTables</code>). Critical: restore '''overwrites''' existing data. What IS transferred: user accounts, permissions, sensor definitions, alerts, dashboards. What is NOT transferred: alert-to-sensor assignments, report-to-sensor assignments, CDR/PCAP data. For dashboard-only migration: extract <code>custom_config</code> table. For cross-OS/cloud migration: perform fresh install and restore backup. For zero-downtime migration: use <code>voipmonitor-migrate.conf</code> with different <code>managerport</code>. '''Troubleshooting: If backup fails with errno 28 (disk full), use smaller "configuration tables" backup instead of "data tables". For GTID replication environments: Configure '''Settings > System Configuration > Database > Extra parameters for mysqldump binary''' with <code>--set-gtid-purged=OFF</code> to prevent backups from breaking GTID-based MySQL replication.''' | '''Summary:''' Guide for backing up VoIPmonitor GUI configuration. Two methods: (1) '''GUI method''' via '''GUI → Tools → Backup & restore''' for one-time backups - select "configuration tables" and "configuration files". (2) '''CLI method''' using <code>backupGuiTables</code> command with cron for automated daily backups. Restoration via GUI or CLI (<code>restoreGuiTables</code>). Critical: restore '''overwrites''' existing data. What IS transferred: user accounts, permissions, sensor definitions, alerts, dashboards. What is NOT transferred: alert-to-sensor assignments, report-to-sensor assignments, CDR/PCAP data. For dashboard-only migration: extract <code>custom_config</code> table. For cross-OS/cloud migration: perform fresh install and restore backup. For zero-downtime migration: use <code>voipmonitor-migrate.conf</code> with different <code>managerport</code>. '''Cloud Token Migration: Each cloud token has its own database. To migrate alerts/reports between tokens, contact support for temporary trial license, restore old database to temporary license, export config via Backup & Restore, import to new license, restart sniffers. Requires support intervention for database restore.''' '''Troubleshooting: If backup fails with errno 28 (disk full), use smaller "configuration tables" backup instead of "data tables". For GTID replication environments: Configure '''Settings > System Configuration > Database > Extra parameters for mysqldump binary''' with <code>--set-gtid-purged=OFF</code> to prevent backups from breaking GTID-based MySQL replication.''' | ||
'''Keywords:''' backup, restore, configuration, GUI, settings, users, sensors, capture rules, cron, automation, disaster recovery, dashboard, migration, upgrade, backupGuiTables, restoreGuiTables, custom_config, overwrite, EOL, fresh installation, voipmonitor-migrate.conf, cross-OS, cloud migration, errno 28, no space left on device, disk full, GTID, global transaction identifier, replication, mysqldump参数, set-gtid-purged, MySQL replication break | '''Keywords:''' backup, restore, configuration, GUI, settings, users, sensors, capture rules, cron, automation, disaster recovery, dashboard, migration, upgrade, backupGuiTables, restoreGuiTables, custom_config, overwrite, EOL, fresh installation, voipmonitor-migrate.conf, cross-OS, cloud migration, cloud token, cloud database, alerts migration, reports migration, trial license, errno 28, no space left on device, disk full, GTID, global transaction identifier, replication, mysqldump参数, set-gtid-purged, MySQL replication break | ||
'''Key Questions:''' | '''Key Questions:''' | ||
| Line 819: | Line 899: | ||
* How do I prevent GUI backups from breaking MySQL GTID replication? | * How do I prevent GUI backups from breaking MySQL GTID replication? | ||
* What is --set-gtid-purged=OFF and when should I use it? | * What is --set-gtid-purged=OFF and when should I use it? | ||
* How do I migrate custom alerts and reports between cloud tokens? | |||
* Why are my alerts missing after switching to a new cloud token? | |||
* How do I transfer GUI configurations from one cloud database to another? | |||
Revision as of 19:32, 7 January 2026
This guide provides a step-by-step method for creating regular, automated backups of your VoIPmonitor GUI's configuration. This includes users, sensors, capture rules, and all other settings configured through the web interface.
Overview
This backup procedure is designed to save only the GUI's configuration data, not the call data (CDRs) or captured PCAP files. It is an essential part of a disaster recovery plan, allowing you to quickly restore a known-good GUI configuration to a new or rebuilt server without backing up terabytes of call data.
The backup process works with three types of data:
- Configuration Tables: The core database tables that store settings, dashboards, and configurations (e.g., `users`, `sensors`, `custom_config`). These include all settings made by GUI users and administrators.
- Data Tables: Supporting data like saved reports.
- Configuration Files: The PHP configuration files from the GUI directory itself (e.g., `configuration.php`).
Quick Backup via GUI Web Interface
For a quick backup before an upgrade, you can use the built-in GUI backup feature directly from the web interface.
ℹ️ Note: This method is ideal for one-time backups before upgrades, reinstallation, or migrations. For automated daily backups, see the command-line script method below.
Steps:
- Open the VoIPmonitor GUI web interface
- Navigate to GUI → Tools → Backup & restore
- Select :backup GUI: configuration tables to back up all database settings made by GUI users and administrators
- Select :backup GUI: configuration files to back up GUI configuration files
- Perform the backup
- Download the generated backup file to a safe location
What Gets Backed Up:
- Configuration Tables includes:
- All user accounts and permissions
- Sensor definitions and configurations
- Capture rules and filters
- Alert definitions and thresholds
- Dashboard configurations
- Reports and their definitions
- Configuration Files includes:
- `configuration.php` and other GUI-specific PHP configuration files
Restoring from GUI Backup:
If you need to restore after an upgrade (for example, if alerts disappear):
- Navigate to GUI → Tools → Backup & restore
- Select :restore GUI: configuration tables
- Upload and select the backup file created earlier
⚠️ Warning: Restoring will overwrite existing GUI settings. Only perform this on a freshly installed GUI or be prepared to lose current configurations.
Automated Daily Backup Using CLI Script
This section describes how to set up automated daily backups using a command-line script. This method is ideal for production environments where you want regular, scheduled backups without manual intervention.
First, create a shell script that will run the export commands.
Create and edit the script file:
nano /usr/local/sbin/backup_voipmonitor_gui.sh
Copy and paste the following content into the file:
#!/bin/bash
#
# VoIPmonitor GUI Configuration Backup Script
#
# --- Configuration ---
# Set the base directory where backups will be stored
BACKUP_DIR="/var/backups/voipmonitor_gui"
# Set the retention period in days. Backups older than this will be deleted.
RETENTION_DAYS=30
# --- Script Logic ---
# Create the backup directory if it doesn't exist
mkdir -p "$BACKUP_DIR"
# Set the filename based on the current date
DAY=$(date "+%Y-%m-%d")
FILE_CFG_TABLES="$BACKUP_DIR/config_tables-${DAY}.sql"
FILE_DATA_TABLES="$BACKUP_DIR/data_tables-${DAY}.sql"
FILE_CFG_FILES="$BACKUP_DIR/config_files-${DAY}.tar.gz"
# Path to the GUI's run.php script
RUN_SCRIPT="/var/www/html/php/run.php"
echo "--- Starting VoIPmonitor GUI Backup for ${DAY} ---"
# Export the configuration and data tables as SQL dumps
php "$RUN_SCRIPT" backupGuiTables -t config -f "$FILE_CFG_TABLES"
php "$RUN_SCRIPT" backupGuiTables -t data -f "$FILE_DATA_TABLES"
# Backup the GUI's PHP configuration files into a compressed tarball
php "$RUN_SCRIPT" backupGuiConfigurationFiles -f "$FILE_CFG_FILES"
echo "Backup files created:"
ls -lh "$FILE_CFG_TABLES" "$FILE_DATA_TABLES" "$FILE_CFG_FILES"
# Clean up old backups
echo "--- Cleaning up backups older than ${RETENTION_DAYS} days ---"
find "$BACKUP_DIR" -type f -mtime +"$RETENTION_DAYS" -name '*-*-*-*.sql' -print -delete
find "$BACKUP_DIR" -type f -mtime +"$RETENTION_DAYS" -name '*-*-*-*.tar.gz' -print -delete
echo "--- Backup complete ---"
Step 1: Make the Script Executable and Test It
Set the correct permissions so the script can be run.
chmod +x /usr/local/sbin/backup_voipmonitor_gui.sh
You can test the script by running it manually: /usr/local/sbin/backup_voipmonitor_gui.sh. It should create three new files in /var/backups/voipmonitor_gui.
Step 2: Schedule the Automated Backup with Cron
The final step is to create a cron job to run the script automatically every night.
Edit the system's crontab file:
crontab -e
Add the following line to the end of the file:
This example will run the backup script every day at 3:30 AM.
30 3 * * * /usr/local/sbin/backup_voipmonitor_gui.sh > /var/log/voipmonitor_backup.log 2>&1
- The `> /var/log/voipmonitor_backup.log 2>&1` part redirects all output (both standard and error) to a log file, which is essential for troubleshooting the cron job if it fails.
Save and close the file. The cron daemon will automatically pick up the new schedule.
Importing Only Dashboards from Another GUI Instance
Use this procedure when you need to migrate dashboards from an old VoIPmonitor GUI instance to a new one.
Recommended Method: GUI Backup & Restore (Simple)
The easiest way to transfer dashboards is to use the built-in GUI backup and restore interface. This method is recommended because it correctly handles dashboard ownership tied to user and group IDs.
1. On the source server (Old GUI):
Navigate to GUI → Tools → Backup & restore
- Select "backup GUI: configuration tables"
- Perform the backup
- Download the generated backup file
2. On the destination server (New GUI):
Navigate to GUI → Tools → Backup & restore
- Select "restore"
- Upload and select the backup file created from the source server
This will import the dashboards along with other GUI configuration. If you want to transfer ONLY dashboards (without other settings like sensors, capture rules, etc.), see the advanced method below.
Advanced Method: Manual SQL Extraction (Dashboards Only)
Use this advanced procedure when you need to migrate dashboards from an old VoIPmonitor GUI instance to a new one without importing other configurations like sensors or capture rules.
Dashboards are stored in the `custom_config` database table, which is part of the configuration backup.
Important Notes
- This process imports dashboards, charts, and associated reports - it is not possible to isolate only the Dashboard layouts
- Folder structures will NOT be preserved - you will need to manually recreate dashboard folders after import
- Dashboard ownership may need to be adjusted (e.g., to make dashboards public or assign to the correct user)
- Panel caching may need to be reconfigured for imported dashboards
Step 1: Create Backups on Both Instances
First, create backups on both the old and new GUI instances:
Old GUI Server:
cd /var/www/html
php php/run.php backupGuiTables -t config -f /tmp/old_gui_config.sql
New GUI Server:
cd /var/www/html
php php/run.php backupGuiTables -t config -f /tmp/new_gui_config.sql
The backup of the new instance is useful for rollback if the import causes issues.
Step 2: Extract the custom_config Table from Old Instance
The `custom_config` table contains dashboard definitions. Extract only this table from the old instance's backup file:
# Extract only the custom_config table INSERT statements
grep -A 100000 "Dumping data for table \`custom_config\`" /tmp/old_gui_config.sql | \
grep -B 100000 "Table structure for table" | \
grep "^INSERT INTO" > /tmp/custom_config_only.sql
Alternatively, you can manually extract the table by editing the SQL file and copying only the `INSERT INTO custom_config` statements.
Step 3: Modify Dashboard Ownership (If Needed)
The `custom_config` table may contain user-specific ownership information. If you need to adjust this, edit the /tmp/custom_config_only.sql file:
nano /tmp/custom_config_only.sql
Common modifications:
- Change user ID values to match users on the new instance
- Set ownership to make dashboards public (if your installation supports this)
- Update any instance-specific paths or IDs
ℹ️ Note: The structure of the `custom_config` table includes fields that may reference user IDs and other instance-specific data. Review your SQL export carefully before importing to ensure data consistency.
Step 4: Import the custom_config Table to New Instance
Import the extracted `custom_config` table into the new GUI instance:
cd /var/www/html
mysql -u voipmonitor_user -p voipmonitor < /tmp/custom_config_only.sql
Or use the GUI web interface if it provides a table import function.
Step 5: Post-Import Tasks
After importing the dashboards, you will need to:
Recreate Dashboard Folder Structures:
The import does not preserve folder hierarchies. Log in to the new GUI and manually create any dashboard folders, then move imported dashboards into the appropriate folders.
Configure Panel Caching:
If your dashboards use cached data for performance, you may need to reconfigure panel caching settings for the imported dashboards.
Verify Permissions:
Check that users who should have access to the dashboards are appropriately configured in the new GUI instance.
Troubleshooting
If dashboards do not appear after import:
- Verify the `custom_config` table was imported correctly by checking the database
- Check for user ID mismatches between the old and new instances
- Clear browser cache and refresh the GUI
- Review any GUI error logs for related messages
How to Restore from a Backup
There are three methods to restore your GUI configuration: the recommended GUI method, the CLI method, or the manual method.
Warning: This process will overwrite your existing GUI settings. Perform these steps on a freshly installed GUI or be prepared to lose current configurations.
IMPORTANT: What IS and IS NOT Transferred
When restoring a GUI configuration backup to a new instance, the following applies:
What IS Transferred:
- User accounts (login credentials, user IDs)
- Permissions and user group assignments
- User settings and preferences
- Sensor definitions (sensor names, IP addresses, capture rules)
- Alert definitions and thresholds
- Filter configurations
- Dashboard configurations
What is NOT Transferred:
- Assignments of alerts to sensors - These must be reconfigured manually after restore
- Assignments of reports to sensors - These must be reconfigured manually after restore
- Sensor user assignments - Access permissions for sensors must be reassigned to users
- Captured call data (CDRs) and PCAP files - These are not included in the backup
Behavior When Merging: If the new GUI instance already has existing data:
- User accounts from the backup will overwrite existing users with the same username or ID
- Sensor definitions will be replaced with the backed-up versions
- Configuration settings will be overwritten
- This is NOT a merge operation - it is a restore that replaces existing data
For these reasons, it is strongly recommended to perform the restore on a freshly installed GUI instance with no existing configuration.
Method 1: Using the GUI Web Interface (Recommended)
The simplest method is to use the built-in GUI backup and restore interface. This method correctly handles dashboard ownership tied to user and group IDs.
1. On the source server (Old GUI):
Navigate to GUI → Tools → Backup & restore
- Select "backup GUI: configuration tables"
- Perform the backup
- Download the generated backup file
2. On the destination server (New GUI):
Navigate to GUI → Tools → Backup & restore
- Select "restore"
- Upload and select the backup file created from the source server
This is the recommended method for migrating dashboards because it automatically handles user ID mapping and ownership correctly.
Method 2: Using the restoreGuiTables CLI Command
The GUI provides a command-line tool to restore configuration tables directly without manually importing SQL files.
1. Navigate to your GUI directory:
cd /var/www/html
2. Restore the configuration tables:
php php/run.php restoreGuiTables -t config -f /var/backups/voipmonitor_gui/config_tables-YYYY-MM-DD.sql
php php/run.php restoreGuiTables -t data -f /var/backups/voipmonitor_gui/data_tables-YYYY-MM-DD.sql
3. Restore the Configuration Files:
Extract the backed-up PHP configuration files into your GUI's web root.
# Extract the archive, overwriting existing files
tar xzf /var/backups/voipmonitor_gui/config_files-YYYY-MM-DD.tar.gz
Method 3: Manual MySQL Import
Alternatively, you can use the mysql command-line client to import the saved SQL dumps.
1. Restore the Database Tables:
mysql -u your_user -p voipmonitor < /var/backups/voipmonitor_gui/config_tables-YYYY-MM-DD.sql
mysql -u your_user -p voipmonitor < /var/backups/voipmonitor_gui/data_tables-YYYY-MM-DD.sql
2. Restore the Configuration Files:
Extract the backed-up PHP configuration files into your GUI's web root.
# Navigate to the GUI's root directory (path may vary)
cd /var/www/html/
# Extract the archive, overwriting existing files
tar xzf /var/backups/voipmonitor_gui/config_files-YYYY-MM-DD.tar.gz
After restoring both the database and files, your GUI's configuration should be fully recovered.
Important: Cross-OS and Cloud Migration Considerations
When migrating VoIPmonitor to a new environment such as Azure or another cloud provider where the destination OS version may differ from the source, do NOT clone or copy binaries between servers. Instead, use a fresh installation approach:
Key Steps for Cross-OS Migration:
- Fresh Installation: Install VoIPmonitor from scratch on the new server using the official installer for the new OS distribution
- Backup GUI Settings: Use the GUI backup/restore feature to transfer users, sensors, alerts, dashboards, templates, and reports (see above)
- Backup Configuration Files: Save
voipmonitor.confand GUI configuration files - Database Migration: Use mysqldump or a migration instance to transfer CDRs
- Copy Spool Directory: Transfer
/var/spool/voipmonitor(captures and recordings) using rsync - GUI PHP Version Dependency: The GUI application is PHP version dependent. When installing on the new server, download the GUI package that matches the PHP version on the destination OS. See Reinstall the GUI for detailed guidance on handling PHP version changes.
⚠️ Warning: Database Version Mismatch: If you are migrating between servers with MySQL or MariaDB versions that differ significantly, do not use mysqldump directly to restore CDR data.
When the old and new servers have different database versions, a direct mysqldump restore may fail or cause compatibility issues. There are two solutions:
Solution 1: Use VoipMonitor Migration Instance (Recommended for CDR Migration)
Instead of using mysqldump directly for the main database:
- Run a VoipMonitor migration instance using
voipmonitor-migrate.conf - Configure the migration instance to read from the old database
- Set the migration destination to a temporary backup database on the new server
- After migration completes, run a second migration instance to move data from the temporary database to the final destination database
- This approach handles schema version differences automatically
Solution 2: Use mysqldump --compatible Option
For smaller databases, you can use mysqldump with compatibility options:
# Example for MySQL 5.7 to 8.0 migration
mysqldump -u root -p --compatible=mysql57 voipmonitor > backup.sql
However, this method may not work for all schema changes and the migration instance method above is more reliable.
These warnings apply primarily to the main CDR database. GUI configuration tables (users, sensors, dashboards) typically have stable schemas that can be migrated directly without issues.
Migrating to a New Server (Simple Fresh Installation Method)
This method describes the straightforward approach for migrating VoIPmonitor to a new server, which is especially useful when the old server is running an end-of-life (EOL) operating system that cannot be upgraded.
Overview
When dealing with legacy systems that have kernel compatibility issues or EOL operating systems, the simplest approach is to perform a fresh installation on new hardware and restore your configuration backups. This avoids complex migration procedures and potential compatibility problems.
This process involves:
- Backing up GUI configuration tables
- Backing up configuration files
- Installing VoIPmonitor on the new server
- Restoring configuration on the new system
- Testing with a subset of traffic
Step 1: Backup Configuration on Old System
Before deactivating the old system, create backups of all essential configuration.
1. Backup GUI Configuration Tables:
Run the backup command from your GUI installation directory:
cd /var/www/html
php php/run.php backupGuiTables -t config -f backup.zip
This command exports all GUI settings including:
- User accounts and permissions
- Sensor definitions
- Capture rules
- Dashboard configurations
- Alert definitions
2. Backup Sniffer Configuration Files:
Copy the main configuration file:
cp /etc/voipmonitor.conf /tmp/voipmonitor.conf.backup
3. Backup GUI Configuration File:
configuration.php contains GUI-specific settings. Copy it from your GUI directory:
cp /var/www/html/voipmonitor/configuration.php /tmp/configuration.php.backup
# Note: Adjust the path if your GUI is installed in a different location
Transfer these backup files to the new server using SCP, FTP, or any other secure method.
Step 2: Perform Fresh Installation on New Server
On the new server, install VoIPmonitor following the standard installation procedures, using a current supported operating system such as Debian 12 (Bookworm) or Ubuntu 22.04.
Follow the Sniffer Installation Guide for the sensor component and the GUI Installation Guide for the web interface.
Step 3: Restore Configuration on New Server
After completing the fresh installation, restore your configuration files.
1. Restore the Sniffer Configuration:
cp voipmonitor.conf.backup /etc/voipmonitor.conf
2. Restore the GUI Configuration File:
cp configuration.php.backup /var/www/html/voipmonitor/configuration.php
3. Restore GUI Configuration Tables:
⚠️ Warning: If you applied a trial license on the new system, you must exclude the 'system' table when restoring to preserve the trial license. Restoring the 'system' table will overwrite the trial license with the old system's license.
ℹ️ Note: The standard web interface restore does not provide an option to exclude specific tables. If you need to exclude the 'system' table to preserve a trial license, use the CLI method below.
cd /var/www/html
# Standard restore (overwrites all tables including license)
php php/run.php restoreGuiTables -t config -f backup.zip
# To exclude 'system' table (preserves trial license):
php php/run.php restoreGuiTables -t config -f backup.zip --exclude-table system
4. Configure Sniffer Parameters:
Edit the sniffer configuration file for the new environment:
nano /etc/voipmonitor.conf
Update these parameters to match the new server configuration:
# Update network interface for packet capture
interface = eth0
# Update spool directory path (if different)
spooldir = /var/spool/voipmonitor
# Adjust maxpoolsize based on new disk capacity
maxpoolsize = 1000000000
# Set server_bind if this is a central server for remote sensors
server_bind = 0.0.0.0
server_bind_port = 60024
Alternatively, you can use the web interface to configure the backup file.
Step 4: Configure Remote Probes
If you have remote probes in a distributed (client-server) deployment, update the configuration on each probe to point to the new central server:
# On each remote probe
nano /etc/voipmonitor.conf
Update the server_destination parameter:
# Update to the new central server IP
server_destination = NEW.CENTRAL.SERVER.IP
server_destination_port = 60024
After updating, restart the probe service:
systemctl restart voipmonitor
Verify the probe appears as connected in GUI → Settings → Sensors.
Step 5: Start and Verify
Start the service and verify it is functioning correctly:
systemctl start voipmonitor
systemctl status voipmonitor
Monitor the logs to ensure the service starts without errors:
journalctl -u voipmonitor -f
Step 6: Test with Subset of Traffic
Before fully migrating or decommissioning the old system:
- Configure network capture to monitor a subset of your traffic (using the capture rules or by mirroring only specific VLANs/ports)
- Verify that calls are appearing in the GUI
- Check for RTP capture issues that were present on the old system
- Play back recorded calls to confirm audio quality
Once you are satisfied that the new system is functioning correctly:
- Expand monitoring to full traffic if needed
- Move your paid license to the new system:
- If you used a trial license on the new system, cancel the trial from voipmonitor.org
- Copy the paid license token from the old system to the new system via GUI → Settings → License
- Or navigate to voipmonitor.org, download the license key file, and upload to the new system
- Decommission the old VoIPmonitor installation:
- Stop the service:
systemctl stop voipmonitor - Disable the service:
systemctl disable voipmonitor - Verify the old system is no longer accessible (optional for security)
- Stop the service:
When to Use This Method vs voipmonitor-migrate.conf
Use this simple fresh installation method when:
- The old server is EOL and cannot be upgraded
- You do not need to migrate historical data (CDRs or PCAP files)
- You want a clean start with zero compatibility issues
- You have network access to the new server for SPAN/mirroring
Use the complex migration method with voipmonitor-migrate.conf when:
- You need to transfer large amounts of historical call data
- You require zero-downtime migration with parallel operation
- You need to migrate database files to a new storage system
Use the database dump/restore or online migration method when:
- You need to migrate the FULL database including CDRs
- You want simple mysqldump restore (acceptable downtime) OR
- You need minimal/no downtime with online migration
The Redundant Database guide covers:
Method 1: Dump/Restore (With Downtime):
- Stop the sniffer on the old server
- Dump database:
mysqldump -u root -p voipmonitor > backup.sql - Transfer and restore on new server:
mysql -u root -p voipmonitor < backup.sql
Method 2: Online Migration (Minimal/No Downtime):
- Install new GUI with fresh database
- Restore GUI configuration tables via backup/restore
- Run migration instance to sync CDRs incrementally
- See Redundant Database for detailed configuration
Migrating VoIPmonitor to New Hardware (Data Migration Method)
This is an advanced method for migrating VoIPmonitor to a new hardware server while transferring existing call data. You use a dedicated migration instance to transfer configuration and data smoothly.
Overview
The migration process involves:
- Backing up GUI configuration (must be done BEFORE starting migration)
- Restoring GUI configuration on the new server
- Running a migration instance using
voipmonitor-migrate.conf - Optionally running the migration instance in parallel with the original sniffer
Step 1: Prepare for Migration
First, create a backup of all GUI configuration on the OLD server:
- On the old GUI, navigate to GUI → Tools → Backup & restore
- Select :backup GUI: configuration tables to back up all database settings (users, sensors, capture rules, dashboards, etc.)
- Download the generated backup file
Step 2: Restore Configuration on New Hardware
On the NEW server:
- Install VoIPmonitor Sniffer and GUI following the standard installation guide
- Restore the GUI configuration backup:
- Navigate to GUI → Tools → Backup & restore
- Select :restore GUI: configuration tables
- Upload and select the backup file created from the old server
Step 3: Create voipmonitor-migrate.conf
The migration configuration file is a copy of your original voipmonitor.conf with migration-specific options added.
Create the migration configuration file:
cp /etc/voipmonitor.conf /etc/voipmonitor-migrate.conf
⚠️ Warning: You must complete the GUI backup and restore procedure BEFORE starting the migration instance. Do not skip steps 1-2.
Step 4: Configure Parallel Operation (Optional)
If you need to run the migration instance while the original sniffer is still active (for zero-downtime migration):
1. Edit voipmonitor-migrate.conf and modify these settings to avoid conflicts:
# Change the manager port to avoid conflicts with the original sniffer
# Default managerport is 6001, choose a different port (e.g., 6002)
managerport = 6002
# IMPORTANT: Comment out or disable ALL bind* options
# These bind to network interfaces and will cause conflicts if both instances are active
#bind = 0.0.0.0:5060
#bindbindip = 0.0.0.0
#bindbindport = 5061
#bindtlsbindport = 5062
2. Ensure other paths (spooldir, pcapdir, etc.) point to appropriate locations on the new hardware
Step 5: Run Migration Instance
Once configuration is restored and the migration config is prepared, start the migration instance:
# Start the migration instance
voipmonitor --config-file /etc/voipmonitor-migrate.conf
# Or using systemd (if configured)
systemctl start voipmonitor-migrate.service
The migration instance will process and migrate data using the restored configuration while avoiding conflicts with any running original sniffer.
ℹ️ Note: After migration is complete, you can switch over to the new hardware by starting the standard voipmonitor service with the main voipmonitor.conf configuration file.
Troubleshooting: Backup Fails with "errno 28" (No Space Left on Device)
If the GUI backup feature fails with the error "Got errno 28 on write", this is a standard system message indicating "No space left on device". This means the disk partition where MySQL creates temporary files during the backup process is full.
| Common Cause: Disk Full During Backup | |
|---|---|
| Symptom | Backup via GUI → Tools → Backup & restore fails with errno 28, even though other operations work. |
| Root Cause | MySQL uses temporary files for backup operations. If the partition containing MySQL's temporary directory (default /tmp) or the data directory (/var/lib/mysql) is full, the backup fails.
|
Diagnosis: Check Disk Space on All Partitions
df -h
Check if the partition containing /tmp or /var/lib/mysql is full.
Resolution: Use Smaller "Configuration Tables" Backup
If you cannot immediately free up disk space, you can still back up your critical GUI settings by selecting the smaller :backup GUI: configuration tables option instead of the full data tables backup.
| Backup Type | Size | Contents | Use Case |
|---|---|---|---|
| Small (typically 1-10 MB) | Users, sensors, capture rules, alerts, dashboards, reports | Recommended for errno 28 issues. Contains all essential GUI settings. | |||
| Large (can be 100+ MB) | Supporting data like saved reports | Not critical for disaster recovery if space is limited. | |||
| Small (KB range) | PHP configuration files | Backup separately (tarball of GUI config files). |
Steps to Perform Smaller Backup:
- Open the VoIPmonitor GUI web interface
- Navigate to GUI → Tools → Backup & restore
- Select ONLY :backup GUI: configuration tables
- Select :backup GUI: configuration files if needed
- Perform the backup
- Download the generated backup file to a safe location
This configuration tables backup contains all the critical settings needed to restore your GUI configuration after an upgrade or migration, while requiring much less disk space to generate.
Alternative Solutions
If you need to perform a full backup including data tables:
- Free up disk space: Check which partition is full using
df -hand remove unnecessary files.
- Change MySQL temporary directory: If
/tmpis full but other partitions have space, configure MySQL to use a different temporary directory. See Data_Cleaning for detailed instructions on MySQL tmpdir configuration.
For more information on disk space management and MySQL Error 28 troubleshooting, see Data Cleaning Guide.
Troubleshooting: GUI Backup Breaks GTID Replication
If your MySQL/MariaDB database uses GTID (Global Transaction Identifier) replication and restoring a GUI configuration backup breaks replication, this is caused by the default mysqldump behavior which includes GTID information in the backup file.
| GTID Replication Breaks After Backup Restore | |
|---|---|
| Symptom | Restoring a GUI configuration backup causes GTID-based replication to fail or become inconsistent. |
| Root Cause | mysqldump includes SET @@GLOBAL.gtid_purged='...' statements by default, which modify the GTID state on restore and break replication tracking.
|
Solution: Configure mysqldump to Exclude GTID Information
The GUI provides a setting to pass additional parameters to the mysqldump binary used during backup operations.
Steps to Configure:
- Open the VoIPmonitor GUI web interface
- Navigate to Settings > System Configuration > Database
- Find the field labeled Extra parameters for mysqldump binary
- Enter the parameter:
--set-gtid-purged=OFF - Save the configuration at the bottom of the page
- Create a new backup using this setting. This backup can now be restored without breaking replication.
ℹ️ Note: The --set-gtid-purged=OFF parameter tells mysqldump to exclude GTID transactions from the SQL dump file. This prevents the restore operation from modifying the GTID state of the target server, preserving replication consistency.
What Happens Without This Setting
By default, mysqldump includes a statement like this in the dump file:
-- GTID state at the beginning of the backup
SET @@GLOBAL.gtid_purged='3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5';
When you restore this dump on a server participating in GTID replication, this statement modifies the GTID state, which can cause:
- Replication conflicts between master and slave
- Error messages about inconsistent GTID state
- Replication thread stopping or failing to start
With --set-gtid-purged=OFF, this statement is not included in the backup, and replication remains unaffected.
Alternative: Manual mysqldump Workaround
If you prefer not to use the GUI backup feature, you can manually dump and restore with the correct options:
Manual backup (recommended for GTID environments):
mysqldump -u root -p \
--set-gtid-purged=OFF \
voipmonitor \
users sensors capture_rules alerts custom_config \
> gui_config_backup.sql
Manual restore:
mysql -u root -p voipmonitor < gui_config_backup.sql
This approach gives you full control over the mysqldump command and ensures GTID data is never included in the backup.
Related Documentation
For more information on GTID replication concepts:
Migrating Alerts and Reports Between Cloud Tokens
This section describes how to transfer custom alerts, reports, dashboards, and other GUI configurations from one cloud token to another in the VoIPmonitor Cloud Service.
Background: Each Cloud Token Has Its Own Database
In the VoIPmonitor Cloud Service, each cloud token is associated with a separate cloud database instance. When you switch to a new cloud token, your custom configurations (alerts, reports, dashboards) remain in the old database and are not automatically transferred to the new token.
ℹ️ Note: Your custom alerts, reports, and other GUI configurations are stored in the cloud database. Switching cloud tokens means switching databases, which is why configurations appear missing after changing tokens.
Migration Procedure Using Temporary Trial License
To migrate configurations from one cloud token to another, follow this step-by-step procedure:
- Step 1
- Contact VoIPmonitor Support
- Contact VoIPmonitor support and request a temporary trial cloud license
- Explain that you need to migrate configurations from an old cloud token to a new one
- Support will create a temporary cloud license for you to use during this process
- Step 2
- Restore Old Cloud Database to Temporary License
- Request that VoIPmonitor support restore a database backup from your old cloud token to this temporary trial license
- Once complete, you will have temporary access to the old database containing your original configurations
- Step 3
- Access GUI with Temporary License
- Log in to the VoIPmonitor Cloud GUI using your the temporary trial license credentials
- Your original custom alerts, reports, and configurations should now be visible
- Step 4
- Export Configuration from Old Database
- Navigate to GUI → Tools → Backup & restore
- Select :backup GUI: configuration tables to back up all database settings
- This includes alerts, reports, dashboards, users, sensors, and other GUI configurations
- Download the generated configuration file
- Step 5
- Import Configuration to New License
- Log in to the VoIPmonitor Cloud GUI using your new, permanent cloud license
- Navigate to GUI → Tools → Backup & restore
- Select :restore GUI: configuration tables
- Upload and select the configuration file you downloaded from the temporary license
⚠️ Warning: Restoring will overwrite existing GUI settings in the new license. Only perform this if the new license has minimal or no customizations, or if you want to replace them with the old configurations.
- Step 6
- Restart All Sniffer Services
After restoring the configuration, restart all sniffer services to force them to reload the updated configuration from the cloud database:
# Restart the voipmonitor service
systemctl restart voipmonitor
# Verify the service is running
systemctl status voipmonitor
Your cloud sniffers should now be using the migrated configurations (alerts, reports, dashboards) from the old cloud token.
Important Notes
- This requires VoIPmonitor support intervention - Only support can restore database backups to a temporary license
- Contact support before switching tokens** - If you know you will be switching cloud tokens, consult with support about migration options before making the switch
- Temporary license has a limited lifespan** - Complete the migration promptly while the temporary license is active
- Alert-to-sensor assignments are NOT included** - After restoring, you may need to manually reassign alerts to specific sensors in the new GUI
What Gets Transferred
The configuration tables backup includes:
- Alert definitions and thresholds
- Report definitions
- Dashboard configurations
- User accounts and permissions
- Sensor definitions
- Capture rules and filters
- Custom GUI settings
As noted in the What IS and IS NOT Transferred section above, alert-to-sensor assignments and report-to-sensor assignments are not included in the backup and must be reconfigured manually after restoration.
AI Summary for RAG
Summary: Guide for backing up VoIPmonitor GUI configuration. Two methods: (1) GUI method via GUI → Tools → Backup & restore for one-time backups - select "configuration tables" and "configuration files". (2) CLI method using backupGuiTables command with cron for automated daily backups. Restoration via GUI or CLI (restoreGuiTables). Critical: restore overwrites existing data. What IS transferred: user accounts, permissions, sensor definitions, alerts, dashboards. What is NOT transferred: alert-to-sensor assignments, report-to-sensor assignments, CDR/PCAP data. For dashboard-only migration: extract custom_config table. For cross-OS/cloud migration: perform fresh install and restore backup. For zero-downtime migration: use voipmonitor-migrate.conf with different managerport. Cloud Token Migration: Each cloud token has its own database. To migrate alerts/reports between tokens, contact support for temporary trial license, restore old database to temporary license, export config via Backup & Restore, import to new license, restart sniffers. Requires support intervention for database restore. Troubleshooting: If backup fails with errno 28 (disk full), use smaller "configuration tables" backup instead of "data tables". For GTID replication environments: Configure Settings > System Configuration > Database > Extra parameters for mysqldump binary with --set-gtid-purged=OFF to prevent backups from breaking GTID-based MySQL replication.
Keywords: backup, restore, configuration, GUI, settings, users, sensors, capture rules, cron, automation, disaster recovery, dashboard, migration, upgrade, backupGuiTables, restoreGuiTables, custom_config, overwrite, EOL, fresh installation, voipmonitor-migrate.conf, cross-OS, cloud migration, cloud token, cloud database, alerts migration, reports migration, trial license, errno 28, no space left on device, disk full, GTID, global transaction identifier, replication, mysqldump参数, set-gtid-purged, MySQL replication break
Key Questions:
- How do I back up my VoIPmonitor GUI before an upgrade?
- How do I schedule automated daily backups using cron?
- How do I restore my GUI configuration from a backup?
- Does this backup include my call recordings (CDRs/PCAPs)?
- What IS and IS NOT transferred when restoring a backup?
- Does the restore merge or overwrite existing data?
- How do I import only dashboards from one GUI to another?
- How do I migrate VoIPmonitor to new hardware?
- How do I migrate VoIPmonitor from an EOL operating system?
- What is voipmonitor-migrate.conf and when should I use it?
- If alerts disappear after an upgrade, how do I restore them?
- What do I do if GUI backup fails with "errno 28" or "no space left on device"?
- How do I perform a backup when disk space is limited?
- How do I prevent GUI backups from breaking MySQL GTID replication?
- What is --set-gtid-purged=OFF and when should I use it?
- How do I migrate custom alerts and reports between cloud tokens?
- Why are my alerts missing after switching to a new cloud token?
- How do I transfer GUI configurations from one cloud database to another?