Backup and move
Torsher backs up its database every day on its own. This page explains what a backup holds, how to keep it away from the server's disk, how to restore it, and how to move your data to another server.
What you'll get
Backups on a disk that survives a failure of the server's disk, and a tested way back from one.
What a backup holds
A backup is one file with the database: the account, profiles, watch positions, ratings, lists, collections, sources and settings. It also holds the key that encrypts saved secrets (indexer API keys, proxy passwords, notification tokens), unless you protect backups with a password.
Videos, downloads, the cache and the log are not in it. Protect your library with disk or NAS snapshots or your own backup tool.
Where to find backups
Everything on this page is in Settings → Backups. The same actions are available as commands in the container, for when the panel doesn't open.
The schedule
By default, the server makes a backup once a day at 04:00 in the container's time zone (TZ) and keeps 7 daily and 4 weekly ones. Change it in the Schedule card:
- Back up every day and Backup time.
- Daily: from 1 to 30 days. Weekly: from 0 to 12 weeks. Old backups are removed only after a new one succeeds.
The server also makes a backup on its own before an update that changes the database, before every restore and before an import. The last three of each kind are kept.
To make one right now, select Back up now, or run:
docker exec -it torsher torsher backupKeep backups on another disk
By default, backups are in /data/db/backups, next to the database. If that disk fails, they go with it. Keep them on a second disk or a NAS share:
Mount the folder into the container in
docker-compose.yml, undervolumes:of thetorsherservice:yaml- /mnt/nas/torsher-backups:/backupsReplace
/mnt/nas/torsher-backupswith the folder on your server. It must exist and be writable byPUIDandPGID.Apply the change:
bashdocker compose up -dIn the Where to keep them card, select Change, enter
/backupsand select Save. The dialog checks that the folder is writable and says whether it is on a different disk from the database.
If the folder becomes unavailable, for example the NAS is off, scheduled backups are skipped and the panel says so. Backups before an update or a restore then go to the default folder and are marked fallback folder.
Don't point several Torsher servers at the same backup folder.
You can also keep copies anywhere you like: Download in the menu of a backup saves the file to your computer.
Protect backups with a password
In the Encryption card, choose how backups are protected:
- Key inside the backup (default): a backup restores on any server without a password, but whoever has the file has your secrets and watch history too. Keep backups where strangers can't reach them.
- Password on the backup: the whole file is encrypted with your password, at least 8 characters. On this server, scheduled backups and restores keep working without typing it.
The password can't be recovered
Without the password, backups made with it are useless on another server. Existing backups keep the password they were made with when you change or remove it.
Restore a backup
Restoring replaces all the server's data with the data from the backup. Everything changed since it was made is lost.
In the panel
- In the Backups list, open the menu of a backup and select Restore….
- Enter the backup password if the dialog asks for it, and select Restore.
The server backs up the current state first, restarts, swaps the database and comes back, usually in under a minute. Playback stops on every device. The restart needs restart: unless-stopped, as in the install file. Without it, start the container again with docker compose up -d, and the page carries on by itself.
A backup file from somewhere else? Select Upload backup… first. Files up to 2 GB are accepted.
With a command
When the panel doesn't open, list the backups and restore one by name:
docker exec -it torsher torsher backupsdocker exec -it torsher torsher restore <backup-name>docker restart torsherA backup with a password needs it on standard input: add --password-stdin and pipe the password in, as in Reset the password.
When the container doesn't start
docker exec doesn't work while the container is stopped or restarting. List the backups and run the restore in a one-off container, then start Torsher:
docker compose run --rm torsher torsher backupsdocker compose run --rm torsher torsher restore <backup-name>docker compose up -dInstead of a name, you can pass the path to a backup file inside the container, for example a file you copied into /data/db.
Move to a new server
A backup moves the whole server.
- On the old server, select Back up now, then Download in the menu of the new backup.
- On the new server, install Torsher and open the panel.
- On the account screen of the setup wizard, choose Restore from a backup, select the file and enter its password if it has one.
- Sign in with the old server's email and password.
Downloads and the library are not in the backup. Copy them yourself to the folders the new server uses, or let it download again what you need.
Move data into another server
To bring profiles into a server that already has its own data, use an export. Unlike a restore, it merges and replaces nothing.
- On the old server, in the Move data card, select Export…. Profiles, watch positions, Watchlist, Favorites, ratings and Dropped are always included. Choose what else to add: Collections, Libraries, Settings, and Keys and passwords with an export password. Select Download file.
- On the other server, in the same card, select Import… and drop the file.
- Choose where each profile goes: into a profile with the same name, into another one, into a new profile, or nowhere. Check the summary and select Import.
The later watch position and rating win, lists and collections are combined, and the other server's settings are kept. Importing the same file twice changes nothing. Profile PINs, the account, devices, torrents and files are never exported.
The server makes a backup before the import, so Undo import… can take it back.
One profile only: Export and Import… in the profile card under Profiles & devices.
From the command line
Export everything with libraries and settings:
docker exec torsher torsher export --libraries --settings > torsher-export.jsonThe file to import must be inside the container, for example copied into /data/db. Preview what will change:
docker exec -i torsher torsher import /data/db/torsher-export.json --dry-runRun it again without --dry-run to apply. --profile <name> exports or imports one profile, --password-stdin reads the export password. After an import with settings or new folders, restart the container.
Check
- The Backups list has a fresh backup, and the Schedule card shows when the next one is due.
- With a second disk, the Where to keep them card doesn't warn that backups are on the same disk as the database.
If something went wrong
- The backup folder is unavailable. The folder isn't mounted into the container or isn't writable by
PUIDandPGID. Check thevolumes:line and the owner of the folder on the host. - Not enough space. The backup needs free space for a copy of the database. Free up space on that disk or choose another folder.
- The server can't open the saved password key: set the backup password again.
TORSHER_SECRETor/data/db/secret.keychanged. Put the old key back, or set the backup password again. - After a restore, indexer keys or passwords are missing. The backup was protected with a different
TORSHER_SECRET, or made with a password elsewhere. Restore the oldTORSHER_SECRETvalue or enter the keys again. - The backup was made by a newer Torsher: update the server first. Update this server, then restore.