Backup and restore
Where in the admin: System › Admin › Backup (
/backup) appears only when the DDoS & BGP module is enabled; for a standard installation use the command line below.
What is backed up
sudo nexcmp backup creates one compressed archive containing:
| Part | Content |
|---|---|
data/**/*.db | Every SQLite database in /var/lib/nexcmp, copied with SQLite's online backup API — consistent even while the panel is running |
files.tar | All other files in /var/lib/nexcmp (settings files, branding uploads, secrets/), except databases and the updates/ folder |
etc/ | A copy of /etc/nexcmp (installer settings, instance ID, port and bind) |
The archive contains your master keys
secrets/ holds the key that encrypts API keys, payment credentials and SMTP passwords stored in the database. The archive is created with permissions 0600. Store it encrypted and off the server. Without these keys a restored database cannot decrypt its secrets.
Take a backup
bash
sudo nexcmp backup # writes to /var/backups/nexcmp
sudo nexcmp backup /mnt/nas/nexcmp # or to another directoryThe command prints the archive path, for example /var/backups/nexcmp/nexcmp-backup-20261030-120000.tar.zst.
Schedule it
bash
echo '17 3 * * * root /usr/local/bin/nexcmp backup /var/backups/nexcmp && find /var/backups/nexcmp -name "nexcmp-backup-*" -mtime +14 -delete' | sudo tee /etc/cron.d/nexcmp-backupCopy the folder off the machine (object storage, NAS, another server).
Restore
Restore onto a server where NexCMP of the same version (or newer) is installed.
- Install NexCMP with the installer using the same license and domain, but do not run the setup wizard.
- Stop the services:bash
sudo systemctl stop nexcmp-vmd nexcmp - Unpack the archive into a temporary directory:bash
sudo mkdir /root/restore && sudo tar --zstd -xf nexcmp-backup-20261030-120000.tar.zst -C /root/restore - Put the files back:bash
sudo tar -xf /root/restore/files.tar -C /var/lib/nexcmp sudo cp -a /root/restore/data/. /var/lib/nexcmp/ sudo cp -a /root/restore/etc/. /etc/nexcmp/ sudo chown -R nexcmp:nexcmp /var/lib/nexcmp - Start the services and check:bash
sudo systemctl start nexcmp nexcmp-vmd sudo nexcmp status - Sign in to
https://<domain>/adminwith the administrator of the backed-up system.
Rehearse it
Do step 1–6 on a spare server once, before you need it. A backup you have never restored is only a hope.
Not included
- nginx configuration and certificates (regenerated by the installer; Let's Encrypt certificates are re-issued).
- Your CloudStack / Proxmox VE servers and the virtual machines on them — back those up with their own tools.