Backup & Restore¶
Backup & Restore lists every backup of this installation, and lets you take, download, upload, restore and delete them. Open it from Backup & Restore in the sidebar.
Admin only
Only admins see Backup & Restore in the sidebar.
What a backup holds¶
A backup is one .jtbak file named after the moment it was taken, such as jaitool-20261204-141046-445.jtbak.
It holds:
- The whole database: every record, its history, every account with its password, and all settings.
- Every uploaded file: thumbnails, gallery pictures and attached files.
It does not hold who is signed in right now.
Restoring a backup puts everything back exactly as it was when the backup was taken.
Encryption and the backup key¶
Every backup is encrypted with the installation's backup key, the BACKUP_KEY set when JAI Tool was installed (see Install).
Without that key nobody can open a backup, you included.
A downloaded backup is encrypted with it too.
Keep the backup key safe
Keep a copy of the backup key somewhere other than the server, such as a password manager. If the server is lost together with its key, every backup of it is unreadable.
If the backup key is ever changed, backups taken with the old one show Requires old decryption key. They still work: type the old key when you download or restore one, or re-encrypt them for the new key.
Where backups are kept¶
Backups are kept in the backup store chosen at installation: a folder on the server (the default), an S3-compatible bucket, or an Azure Blob Storage container. See Install. A copy that only lives on the same server does not survive the loss of that server, so download a backup now and then and keep it elsewhere, or use a bucket or container elsewhere.
Uploaded files are stored once and shared by every backup that has them, so ten backups of the same pictures don't take ten times the space.
The page¶
The bar at the top shows:
| Fact | What it means |
|---|---|
| Backups on disk | The space all backups take in the backup store. |
| Free space | Space left in the backup folder. Shown only for a folder on the server. |
| File pooling saved | The space saved by storing each uploaded file once for all backups. |
The table lists backups newest first:
| Column | What it shows |
|---|---|
| Backed up on | When the backup was taken. An uploaded backup keeps the date it was originally taken. |
| Name | The file name. |
| Database | The size of the database part. |
| Files | The size of the uploaded files it holds. |
| Total | Both together. |
| Source | How it was made: Manual (Create backup), Automatic (the schedule), Restore point (taken just before a restore), Before DB migration (taken just before an upgrade), or Uploaded (Upload backup). |
| Created by | The admin who took it; for an uploaded backup, whoever took it originally, else whoever uploaded it. System for one made by the app itself. Empty for an unreadable file. |
| Status | OK; Requires old decryption key for one encrypted with an earlier backup key; or Unreadable for a file the app can't open, such as a damaged one or one from a JAI Tool version whose backups this version can't read. |
Each row ends with Download, Restore and Delete. An Unreadable backup can only be deleted.
Create a backup¶
Click Create backup. The page shows "Creating" until it is done, then the toast "Backup taken", and the new backup tops the list with Source Manual.
Take one before any big change, such as a large import or a bulk edit. Only one backup or restore runs at a time; if one is already running, the toast says "Another backup is running".
Download¶
Click to save the backup to your computer as one .jtbak file.
The file is complete: it holds the database and every uploaded file, ready to upload to this or another installation.
It is encrypted with the current backup key.
For a backup that shows Requires old decryption key, the click opens Download this backup? with its details and a Backup key box. Type the old key; Download turns on once the key is checked (see Checking a key). The download is encrypted with the current key, so afterwards it opens without the old one.
Upload¶
Click Upload backup and pick a .jtbak file.
The page shows "Uploading" with progress, then the toast "Backup uploaded".
The backup joins the list with Source Uploaded; nothing is restored yet.
The upload is checked before it is kept. "Upload failed:" toasts say why, for example "only .jtbak files", "not a JAI Tool backup", "incompatible JAI Tool version" or "damaged, database checksum mismatch".
A backup encrypted with another installation's key, or with an earlier key of this one, fails with "needs its old key". A Backup key box then appears next to Upload backup: type that key and pick the file again. The uploaded copy is stored encrypted with this installation's key.
Restore¶
Restoring replaces the whole database and every uploaded file with the backup's. Everything done since the backup was taken is undone: records, history, accounts, passwords and settings.
- Click on the backup's row.
- Check the details in Restore this backup?.
- For a backup that shows Requires old decryption key, type that key in Backup key.
- Click Restore, then drag Slide to confirm all the way to the right.
The page shows "Restoring" until it is done, then the toast "Database restored".
Before it changes anything, the restore:
- Refuses an Unreadable backup, and one made by a newer JAI Tool version: "made by a newer JAI Tool, update first".
- Checks that the backup and its files are complete and undamaged.
- Takes a new backup of the current state, listed with Source Restore point. If the restore was a mistake, restore that one to undo it.
A backup from an older JAI Tool version is brought up to date after restoring, so it works with this version. The list of backups is not part of the database: restoring never removes backups taken after the one you restore.
If something fails halfway, the toast says what and names the restore point that holds the state from before.
Warning
A restore can't be undone except by restoring the Restore point it took. Everyone loses what they did in the app after the backup was taken.
If JAI Tool can't start at all, you can also restore from the server's command line; see Install.
Delete¶
Click on the row, check Delete this backup?, click Delete, then drag Slide to confirm all the way to the right. The toast says "Backup deleted".
Warning
A deleted backup is gone for good.
Uploaded files that no remaining backup uses are removed from the backup store too.
Checking a key¶
In Download this backup? and Restore this backup?, the Backup key is checked as you type: below the box it says Valid key or Invalid key. Download and Restore work only with a valid key. A key you type is used for that one download, restore, upload or re-encryption and is not kept.
Re-encrypt older backups¶
After the backup key changes, Re-encrypt backups appears above the list while any backup shows Requires old decryption key. Re-encrypting turns those backups into backups of the current key, so they open without the old one.
- Click Re-encrypt backups.
- Type the old key. Below it, the dialog says how many waiting backups that key opens, such as "Opens 3/3 backups".
- Click Re-encrypt.
A progress bar counts the backups as they are done, one by one, then the toast says how many were re-encrypted. If several old keys were used over time, repeat with each of them.
Automatic backups¶
Automatic backups run on the schedule set in System settings > Backups, which also sets how many of them are kept. Only Automatic backups are deleted when there are too many; Manual, Uploaded, Restore point and Before DB migration backups stay until you delete them.
The Overview warns admins with a Backups event when no backup exists, when an automatic backup is more than an hour overdue, or when automatic backups are off and the newest backup is over 7 days old. A Scheduler event means the app's scheduler stopped, so no automatic backups run until the app is restarted. See Attention & Ongoing.
Backup before every upgrade¶
When a new JAI Tool version needs to change the database, the app takes a backup first, listed with Source Before DB migration. If that backup fails, the database is not changed. Only the newest Before DB migration backup is kept; each upgrade replaces the previous one. It holds the database as it was before the upgrade, your way back if an upgrade goes wrong; see Install.
Restoring on another installation¶
To move JAI Tool to a new server, download a backup, upload it on the new installation, and restore it. If the new installation has a different backup key, type the old one when uploading.
The mail server password and everyone's two-factor authenticators are stored encrypted with the installation's SECRET_KEY.
If the new installation has a different SECRET_KEY, they read as empty after the restore: type the mail password again in System settings > Email, and people with two-factor set it up again.
Tips¶
- Keep automatic backups on, running every day, in System settings > Backups.
- Keep a copy of the backup key off the server, such as in a password manager: without it, no backup can be opened.
- Keep backups away from the server too: use a bucket or container elsewhere, or download one now and then.
- Click Create backup before a big import or bulk edit, so you can go back.
- Keep enough automatic backups to cover the Delete after time of automatic cleanup, so a record cleanup removed is still in some backup.

