Updates and backups¶
Where your data lives¶
With the built-in database, everything is in the folder mounted at /data, which is ./data in the install guide:
typstdrive.dband the files next to it hold accounts, documents, versions, settings and uploaded files.
If you use PostgreSQL or MySQL, your data is in that database instead. If you use object storage, uploaded files are in your bucket.
Backing up¶
Built-in database¶
The simplest safe backup is to stop TypstDrive for a moment and copy the folder:
To back up without stopping, use SQLite's own backup command inside the container. It makes a consistent copy while TypstDrive keeps running, and saves it as data/typstdrive-backup.db:
PostgreSQL¶
MySQL and MariaDB¶
Tip
Keep backups on a different machine or disk than the server, and keep more than one. Test a restore now and then.
Restoring¶
- Stop TypstDrive with
docker compose down. - Put the backup back: copy the folder or
typstdrive.dbback intodata, or load the SQL file into an empty database. - Start TypstDrive with
docker compose up -d.
Keep the same COOKIE_SECRET, or everyone simply has to sign in again.
Updating¶
- Make a backup.
-
Download the new version and restart:
TypstDrive upgrades its database automatically when it starts. Site Settings → About shows the version you are running, and the drive sidebar tells you when a newer release is available.
To stay on a specific version instead of always the newest, replace latest in the image name with a version tag from the releases page.