Backup and restore

Everything is in one SQLite file in the Docker volume, with the attachments in a folder next to it. A backup is a copy of those, made while the app is in use: as an administrator you download it in the app, or you make it with a command on the server.

Downloading in the app

  1. Open Account, password and devices and choose User management.
  2. Expand Backup and read the warning.
  3. Enter your password (and a code from your authenticator app if you use two-step verification) and choose Download backup.

Your browser saves one file, tickory-backup-2026-11-17.tar, containing:

A tar file is a plain archive without compression: Linux, macOS and Windows 10 and later unpack it with tar -xf, and 7-Zip opens it too. The server sends it in parts, so a large backup does not fill up the server's memory. You can download at most five backups per hour, and every download is written to the server log with your name. It does not work in the Android app; open Tickory in a browser for this.

What is in it

The backup contains the tasks and attachments of all users, the password hashes, the private key for notifications (VAPID) and the secret behind the buttons in notifications (HMAC). Keep it as carefully as the server itself. The key file for two-step verification (secret.key) is deliberately not included, so a stolen backup does not give away the second step. Keep your own copy of it, separately from your backups; see below.

With a command on the server

Making a backup

docker compose exec -T tickory node server/backup.ts /data/backups/todo-$(date +%F).db

This makes a complete, consistent copy with today's date in its name, for example todo-2026-11-17.db.

Attachments are included

The attachments are not in the database but files in the attachments/ folder of your data volume. The same command copies them along: next to todo-2026-11-17.db comes a folder todo-2026-11-17.attachments/ with the files of the attachments that are in that copy. That way the database and the files belong together; a file that was deleted between the two steps is skipped and reported. Get both off the server. Count on extra storage: the size of your attachments comes on top, and the copy contains everything users have uploaded, so keep it as carefully as the database.

Getting the copy off the server

The copies are in the same volume as the database itself. If the disk fails, you lose both. So get them off the server regularly:

docker cp tickory:/data/backups ./backups

and put the directory backups somewhere else: on another computer, an external disk, or encrypted with a storage service. You clean up old copies yourself; they are not removed automatically.

Keep a backup the way you keep the database

A copy contains all tasks of all users, the password hashes, the (hashed) sessions and the server's keys for notifications: the private key (VAPID) and the secret that signs the buttons in a notification. Whoever has it can use those buttons to complete or postpone any task of any user. Do not leave it where others can get at it, not even in a folder that other users of the server can read.

Automatically, every night

The server can do this itself, without cron. Put in .env:

BACKUP_DIR=/data/backups
BACKUP_TIME=03:00
BACKUP_KEEP=14

and start the container again (docker compose up -d). The server then makes one copy every day after 03:00, todo-2026-11-17.db with the attachments in todo-2026-11-17.attachments/, just like the command above. If the server was off at that time, it makes the copy as soon as it runs again. The newest 14 copies stay (BACKUP_KEEP); the server removes older ones itself, but only files with exactly that name: whatever you put there yourself stays. The time is in DEFAULT_TIMEZONE if that is set. In User management, under Backup, you see whether it is on and when the last copy was made (or what went wrong).

Mind the space: every copy also contains all attachments. And a copy in the same volume protects against mistakes and a damaged database, not against a broken disk: regularly get them off the server (see above).

Rather schedule it yourself? Then schedule the command with cron on the server (crontab -e). This example makes a copy every night at 3 o'clock; change the path to the directory that holds your docker-compose.yml. In a crontab a percent sign is written as \%.

0 3 * * * cd /path/to/tickory && docker compose exec -T tickory node server/backup.ts /data/backups/todo-$(date +\%F).db

Restoring a backup

The app has to be stopped for this. Put the file you want to restore as backup.db in the directory where you run the commands.

docker compose down
docker run --rm -v tickory_tickory-data:/data -v "$PWD":/backup alpine sh -c \
  "rm -f /data/todo.db-wal /data/todo.db-shm && cp /backup/backup.db /data/todo.db && chown 1000:1000 /data/todo.db"
docker compose up -d

If you also restore the attachments, copy the folder todo-2026-11-17.attachments back to /data/attachments of the volume, for example in the same command (cp -r /backup/todo-2026-11-17.attachments/. /data/attachments/, then chown -R 1000:1000 /data/attachments). At start-up the server checks that the database and the files fit together: files without an attachment are cleaned up, and an attachment whose file is missing (because you did not restore the folder) is reported in the log and stays in the list, but cannot be opened.

Restoring a downloaded backup (tar)

Put the file in the folder where you run the commands, and adjust the file name:

docker compose down
mkdir restore && tar -xf tickory-backup-2026-11-17.tar -C restore
docker run --rm -v tickory_tickory-data:/data -v "$PWD/restore":/restore:ro alpine sh -c \
  "rm -f /data/todo.db-wal /data/todo.db-shm && cp /restore/tickory.db /data/todo.db && rm -rf /data/attachments && cp -R /restore/attachments /data/attachments && chown -R 1000:1000 /data/todo.db /data/attachments"
docker compose up -d

This replaces both the database and the attachments folder with the ones from the backup. The key file secret.key in the volume stays. Restoring onto a new server? Then also copy your saved secret.key to /data/secret.key (with chown 1000:1000); without that file two-step verification no longer works and has to be turned off per user with user reset-2fa (see Managing users).

After that: the devices fetch everything again by themselves

Every backup (made with the command or downloaded in the app) gets its own mark. When you restore one, every device notices at its next sync that the server is in a different state, and fetches everything again: whatever it still knew from after the backup disappears there too. Tasks that were still waiting to be sent from a device (for example added offline) are simply sent along. So you do not need to sign in again.

If you restore not a Tickory backup but a copy of the whole disk or volume (a snapshot), it has no mark of its own. To be safe, sign out and in again on every device (Settings, then Sign out and clear local data).

Whatever was added or changed after the backup was made is gone after restoring.

Without Docker

The command is the same, without the Docker part:

node server/backup.ts ./backups/todo-$(date +%F).db

Automatic backups work here too, with the same settings (BACKUP_DIR=./backups and so on).

The source is the file from DB_PATH (./data/todo.db by default). You restore by stopping the server, removing the files todo.db-wal and todo.db-shm next to the database, putting your copy in the place of todo.db and starting the server again.