Database and Recovery
Database backups protect Engine records. Installer recovery points protect local program files. Keep an off-server copy before upgrades, restores, bulk edits, or migrations.
Create a Backup
- Open Settings → Database Backup.
- Create a backup and wait for completion.
- Download the file to protected off-server storage.
Local backups are stored in /opt/xaccel-engine/storage/backup/. Configure the schedule and local retention under Settings → System Settings → Database.
Backup Types and Retention
New filenames use xaccel-engine-<type>-<version>[-<server>]-<timestamp>-<checksum>.gz. The Source column shows the type:
| Type | Created By | Automatic Cleanup |
|---|---|---|
auto | Database Backup Schedule | Old, unprotected backups only |
manual | Backup Now or the backup API | Never |
installer | Installation or recovery | Never |
Older Engine filenames remain supported and keep their original names. Do not rename backup files to change their type.
Database Max Backups keeps the newest N unprotected automatic backups. 0 means unlimited. Manual, installer, and Keep When Rotate backups do not count toward this limit. Cleanup runs after a successful scheduled backup; changing the limit alone does not delete files.
Use Keep When Rotate to protect an automatic backup. Each checkbox saves separately, including when the list is filtered or paged. Protection does not prevent manual deletion. Download important backups to another server, and delete unneeded manual or installer copies yourself.
Changed in Engine 1.0.2+
Optimize a Table
- Open Settings → Database Tables.
- Sort by Total Size and select one table.
- Download a current backup.
- Run Optimize during low traffic and verify disk space afterward.
Optimization may rebuild and lock a table, require temporary disk space, and may not reduce its size.
Automatic ID Counter Maintenance
At Master startup, Engine lowers inflated auto-increment counters to the highest existing ID plus one, or 1 for an empty table. Existing records and their IDs stay unchanged. Tables without auto-increment IDs are skipped.
This reclaims unused values above the highest ID; it does not fill gaps between records or reduce database size. Deleted IDs above the current maximum may be reused. If a large ID already exists, new IDs remain above it.
Busy tables or tables that cannot be adjusted without copying data are skipped with a log message. Maintenance has a short time limit and does not prevent startup; it is retried on the next Master restart. LB restarts do not reset counters.
Restore
- Download a backup of the current database and stop configuration changes.
- Upload or select the intended compatible backup.
- Confirm the restart.
- Verify login, License, Servers, Streams, DVB, Users, VOD, and playback.
Restore accepts Engine .gz database backups. Engine checks the backup type and compressed file integrity before scheduling a restart and again before restoring. Older Engine backups without a format marker are checked by their contents. Codec, unrecognized, and damaged backups are rejected; use Tools → Import for Codec backups.
Changed in Engine 1.0.1+
The Master upgrades an older database before starting normal services. If migration fails, fix the reported error and restart. A database from a newer Engine version requires compatible software or a matching backup. Upgrade the Master before LB servers.
Engine 1.0.1+
Recover Program Files
sudo bash ./xaccel-engine-<version>.sh --recoveryUse installer recovery for a failed software upgrade and a database backup for database restoration.
Migrate
- Install a compatible Engine release on the target.
- Back up and restore the source database.
- Copy media, certificates, and operator-owned files with their permissions.
- Reissue or activate the target license.
- Update addresses, interfaces, DNS, TLS, SSH, and media paths.
- Test all required functions before moving traffic.
Do not run two machines with one license.