Backups and upgrades
A backup is a safe copy of your data, so you can get it back if something goes wrong. An upgrade moves you to a newer NuRoute version.
Every command on this page runs on the server, from the folder NuRoute is installed in (cd nuroute).
Back up
./backup.sh
You should see:
Backing up the database…
✓ Backup: backups/20261005-122748 (16K). Copy it somewhere off this server, too.
backups/20261005-122748
What is in a backup? The backup folder holds:
- the whole PostgreSQL database (users, organization, projects, keys, policies, routing history),
- a copy of
.env(the keys needed to read it), - the NuRoute version.
NuRoute keeps running while it backs up. Request logs and usage charts (ClickHouse) are not included.
Back up every day, and keep a copy off the server
A backup on the same disk is lost together with the disk. So do both of these.
1. Schedule a daily backup. For example, a backup every day at 03:00 with cron (the scheduler built into Linux). Type crontab -e, then add this line, using your own folder:
0 3 * * * cd /home/ubuntu/nuroute && ./backup.sh >> backups/backup.log 2>&1
2. Copy backups/ to your backup storage with the tool you already use (rsync, restic, your cloud provider's backup service). Each backup contains .env, so store the backups as carefully as .env itself.
Restore
Restoring takes you back to a backup. Use it after a mistake, or on a new server:
./restore.sh backups/20261005-122748
It asks you to type restore to confirm, because everything written since that backup is lost. Then it:
- stops NuRoute,
- restores the database (and
.env, if its encryption keys differ), - switches back to the NuRoute version the backup was made with,
- starts again.
Stopping NuRoute…
Restoring the database…
Starting NuRoute 1.0.0…
Waiting for NuRoute to be ready... ready.
✓ Restored backups/20261005-122748
Upgrade
New releases are listed, with what changed, on github.com/NuRoute-ai/nuroute-selfhosted/releases. Watch the repository on GitHub (Watch → Custom → Releases) to get an email when a new one comes out.
./upgrade.sh 1.1.0
You should see:
Upgrading NuRoute 1.0.0 → 1.1.0
Release notes: https://github.com/NuRoute-ai/nuroute-selfhosted/releases/tag/v1.1.0
1/4 Downloading 1.1.0…
2/4 Backing up…
3/4 Starting 1.1.0 (applies database changes)…
4/4 Checking it works…
Waiting for NuRoute to be ready... ready.
✓ NuRoute 1.1.0 is running. The backup from before the upgrade is in backups/20261105-090112.
Requests are interrupted for a minute or two while the services restart. Plan upgrades for a quiet time.
If the new version does not start
The script puts everything back by itself: the backup it made in step 2, and the previous version. It saves the logs and tells you:
! 1.1.0 did not start. Putting 1.0.0 and the backup back…
Error: the upgrade to 1.1.0 was rolled back; you are on 1.0.0 again. Send upgrade-failure-1.1.0.log to support@nuroute.ai.
You are then running the previous version exactly as before. Send us the log file it names.
Which version should I run?
Any release from the last two minor versions (or 12 months) is supported and gets security fixes. You can skip releases: going from 1.0.0 straight to 1.3.0 is fine.
The routing model and model catalogue are not tied to releases. They update with the licence check-in (see Licence and updates).
Upgrade a server without internet access
First load the new release's images onto the server. We send you an archive (made with docker save) on request, and you load it with docker load -i <file>. Then:
./upgrade.sh 1.1.0 --no-pull
It checks that every image is on the server before it changes anything.
Move to a new server
- On the old server: run
./backup.sh. Copy the newestbackups/<date-time>folder to the new server. - On the new server: install as usual (Install), with the same domain. Stop at step 2: do not activate or create an admin.
- Restore: run
./restore.sh backups/<date-time>(the folder you copied into the new install'sbackups/). - Point the domain's DNS at the new server.
- Move your licence. It is tied to the old install. Ask support@nuroute.ai to move it, then enter your licence key again on Licence & system.
Remove NuRoute
To stop NuRoute and delete it with all its data, run this from the install folder:
./backup.sh # if you might want the data later
docker compose down --volumes
cd .. && rm -rf nuroute
docker compose down --volumes deletes the database, logs and certificates permanently. Without --volumes, the data stays in Docker volumes until you remove them.