Restoring from a Backup#
The database restore process is intended to restore an installation of the same version. It is not intended to likewise perform a version upgrade concurrently, as the database migrations will not run after importing the database, leading to data mismatch.
If you do not know what version your old installation was running, please contact us for assistance.
- Gather up all the files: you’ll need our backup-restore.sh script, the database backup file from your backup server (named
database.gz, ordatabase.gz.encfor the encrypted backups made by backup package 2.4.0 and later), and yoursynergycp-config-backup.tar.gzconfig backup file.
Encrypted backups are decrypted automatically by the restore script, using the secret key inside your configuration backup — this is why the configuration backup is required. To decrypt one manually (for example to inspect the SQL), use the
APP_KEYvalue from the.envin your configuration backup:openssl enc -d -aes-256-cbc -pbkdf2 -iter 100000 -md sha256 \ -pass "pass:$APP_KEY" < main-database.1077.gz.enc | gunzip > dump.sql
-
Upload all 3 of those files, using the same names above, to any one folder on your new SynergyCP master server. Make sure that server is a fresh server with nothing installed and meets all of the install requirements.
-
Run the restore script:
bash backup-restore.shas the root user on the new server from the directory with those 3 files.
The script verifies both backup files and asks for confirmation before it changes anything (pass
-yto skip the prompt for unattended runs), and it writes a full log torestore.login the same directory. If a run fails — for example because a file was corrupt in transit — you can fix the cause and simply run the script again on the same server: it detects the existing installation and resumes instead of reinstalling.
What the script takes from each file:
- Configuration backup: the secret key and the SSH key pair. The script writes the secret key into
/scp/etc/php.env(the previous file is kept next to it asphp.env.before-restore-<date>), restarts SynergyCP so every service uses it, and checks that it is in effect before it touches the database. Expect the panel to be unavailable for about a minute during that restart.- Database backup: everything in the SynergyCP database. The database on the new server is erased and replaced.
The database login is not restored. Each installation has its own database accounts, created when it is installed, and the new server keeps the ones it was installed with.
-
The DHCP & File server’s API key running on the main SynergyCP web instance will now be mismatched, since new API key information was generated during the install process. To update them:
cd /scp/pxe/dhcp ./bin/install.sh # Copy the info to the DHCP server on SynergyCP.cd /scp/pxe/file ./bin/install.sh # Copy the info to the File server on SynergyCP. -
Run switch scans on every switch to update the bandwidth polling configuration file that is stored on disk. This can be done in bulk using the checkboxes on the switch list page.
If you get a message to the effect of “The MAC is invalid”, the panel is not running with the secret key from your
synergycp-config-backup.tar.gzfile, so it cannot read the passwords stored in the restored database. The restore script now applies and verifies that key itself. If you restored with a copy of the script downloaded before November 2026, download the current backup-restore.sh and run it again on the same server with the same files; it resumes without reinstalling. If the message persists, please contact us and attachrestore.log. -
We recommend deleting the config and database backup files from the new server once they have been imported successfully, along with the
restore.logfile the script wrote.
Getting help#
If the restore fails or the panel misbehaves afterwards, please open a ticket and attach the restore.log file from the directory you ran the script in. It contains the full output of every restore attempt on that server, which lets us pinpoint the failing step without back-and-forth.