Skip to main content

Backups and upgrades

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

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) and the NuRoute version. NuRoute keeps running while it backs up. Request logs and usage charts (ClickHouse) are not included.

Back up every day, and copy the backups off the server. A backup on the same disk is lost with the disk. For example, a daily backup at 03:00 with cron (crontab -e, then add this line with your folder):

0 3 * * * cd /home/ubuntu/nuroute && ./backup.sh >> backups/backup.log 2>&1

Then 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 them as carefully as .env itself.

Restore​

To go back to a backup (for example 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. It stops NuRoute, restores the database (and .env, if its encryption keys differ), switches back to the NuRoute version the backup was made with, and 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 be emailed when 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 release 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 to run: any release in the last two minor versions (or 12 months) is supported and receives security fixes. You can skip releases: going from 1.0.0 straight to 1.3.0 is fine.

The routing model and model catalog are not tied to releases; they update with the licence check-in (see Licence and updates).

Upgrade a server without internet access​

Load the new release's images onto the server first (we send you an archive with docker save on request, which you load with docker load -i <file>), then:

./upgrade.sh 1.1.0 --no-pull

It checks every image is on the server before changing anything.

Move to a new server​

  1. On the old server: ./backup.sh, and copy the newest backups/<date-time> folder to the new server.
  2. On the new server: install as usual (Install), with the same domain, then stop at step 2 (do not activate or create an admin).
  3. Restore: ./restore.sh backups/<date-time> (the folder you copied into the new install's backups/).
  4. Point the domain's DNS at the new server.
  5. Your licence 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, 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 for good. Without --volumes, the data stays in Docker volumes until you remove them.