# Moving a VICIdial server: what we copy and what we never copy

> A VICIdial move is a database import with rules. Which tables travel, which never do, what gets rewritten, and how to prove nothing was lost.

URL: https://trustane.com/blog/move-vicidial-server-what-to-copy
By Trustane. Published 2026-11-05.

> **To the point**
> Moving a VICIdial floor means importing the data tables, rewriting every column that holds the old server address, and leaving the new machine's own identity alone. The rows that describe the old box, and the eight in-memory tables, never travel.
>
> - Check `db_schema_version` first. Import only into a destination at the same schema or newer.
> - Skip the eight MEMORY tables, the old `servers` row, settings and carriers.
> - Rewrite every `server_ip` column, then count the old address. We got zero left.
> - Compare row counts by full scan, not `COUNT(*)`.
> - Recordings are files and move separately.

## Check the schema direction first

Three version numbers live in `system_settings`: `version`, `db_schema_version` and an SVN revision. Only `db_schema_version` decides whether the move is safe.

A dump carries the columns the source had. Import it into an older schema and whatever that schema has never heard of is silently dropped. VICIdial's upgrade path only moves forward.

- Destination behind the source: stop and upgrade the destination. Never downgrade the source.
- Destination ahead: the normal, safe direction.
- Equal: nothing to reconcile.

On our first real move the source was at schema 1745 and the destination at 1750 or higher. Across 344 common tables, zero columns existed only on the source.

## What never travels

The destination already has a `servers` row, `system_settings`, carriers, a template set, a session table and performance logs. They describe the destination. Pass them to `mysqldump` with `--ignore-table`, along with the live-agent table, `session_data`, `server_performance` and the per-address `cid_channels_recent_<ip>` table.

Eight tables live in memory and are rebuilt empty on every restart: `vicidial_auto_calls`, `vicidial_hopper`, `server_updater`, `live_channels`, `live_sip_channels`, `parked_channels`, `vicidial_campaign_server_stats`, `web_client_sessions`. Copying them imports a photograph of calls that are not happening. `mysqlcheck` cannot check them and prints a note, which is noise, not damage.

> **Do not restore vicidial_users whole**
> The destination has its own admin user, API user and web phone entry. Preserve that short list with `mysqldump --replace --where` and put it back after the import. `--replace` writes `REPLACE INTO`, so a search for `INSERT` finds nothing.

## What gets rewritten

Every one of these can hold the old address: `servers.server_ip`, `phones.server_ip`, `vicidial_inbound_dids.server_ip` and `.filter_server_ip`, `vicidial_remote_agents.server_ip`, `recording_log.server_ip`, `vicidial_conferences.server_ip`, `conferences.server_ip`, `vicidial_stations.server_ip` and `vicidial_automated_reports.report_server`.

Do not trust a hand-made list. Drive the rewrite from `information_schema.columns`, which finds every `server_ip` and `call_server_ip` column, then count the old address afterward. Check `hostname -f` where links carry a name. Finally set `rebuild_conf_files='Y'` on the server row, reload Asterisk, and restart cron and the VICIdial processes.

## The order that kept the data

![Diagram: seven steps of a safe VICIdial database move, from disk check to restart](https://trustane.com/media/be9e7b1dfc545d1e-1600x1223.webp "The order matters more than the tooling")

1. **Check disk.** About twice the database size plus the recordings, with 30 percent headroom.
2. **Take a rollback net.** `mysqldump --add-drop-table | gzip` of the destination.
3. **Quiesce the source.** See [how to tell a server is idle](https://trustane.com/blog/is-vicidial-server-idle).
4. **Dump read-only:** `--skip-lock-tables --no-create-info --complete-insert --quick --hex-blob`, piped to `gzip`.
5. **Verify with `gzip -t`** and refuse to continue if it fails.
6. **Preserve, stop, truncate, import** with foreign key and unique checks off.
7. **Re-apply the preserved rows, rewrite addresses, restart.**

> **Make step 5 an enforced check**
> If a stage returns 1 but the script's last command is a logging pipe, the script exits 0 and a wrapper carries on into the truncate. Use `set -e` or check each stage's status, and read the exit code of the thing that matters.

### In the Trustane console

![Trustane console Migrate in page with the connection fields marked](https://trustane.com/media/755e067727599bcd-1600x712.webp "Migrate in, step 1 of 4: how we reach your old box")

1. **How we get into your old box**: pick a password or a key.
2. **Host / IP of your existing dialer**: the source to read from.
3. **Check my dialer**: reads it before anything is written.

## Prove it with full scans

![Diagram: recording_log row count from the stored header versus a full scan](https://trustane.com/media/f5f8370f0ebb0a3b-1600x528.webp "The header number would have made a perfect move look like a 37 percent loss")

Do not use `COUNT(*)` on a MyISAM table after an unclean shutdown. Count a column that cannot be null, `COUNT(start_time)` here, on both sides. Then compare file counts and, if you can, the sum of bytes.

## Recordings are a separate move

Recordings are files. One set we moved was 24 GB in about 258,000 files. Use `rsync`, not `tar`, because it resumes, and throttle with `--bwlimit` or run off hours. They can finish after cutover, as long as the new box can play what has arrived.

We tested ViciBox 12 sources and destinations, schema 1745 and up, MyISAM only. With InnoDB tables `--single-transaction` becomes available and the locking story changes.

## Questions people ask

### Which version number matters?

`db_schema_version`. The SVN revision is advisory, because the working copy can differ from the database you are importing into.

### How long does the move take?

The database part is hours or less. Recordings take longest and can run past cutover.

## Next steps

Our [migration service](https://trustane.com/migrate) runs these steps in this order. [Server hosting](https://trustane.com/vicidial-hosting) covers where the new box lives, [pricing](https://trustane.com/vicidial-pricing) the cost, and [build times](https://trustane.com/blog/vicidial-server-build-times) how fast the destination can exist.

VICIdial is a trademark of its owner. Trustane is an independent hosting provider.
