Documentation
Backup, restore and updating
What to back up, how to restore, and how to update the container.
What to back up
AniFlow keeps everything that is yours in two folders that you mount into the container. Nothing that matters lives inside the container itself.
| Folder | What is in it |
|---|---|
/config | The settings file aniflow.yaml, the log, your indexer, feed and subgroup profile files, and your own themes |
/data | The main database aniflow.db (watchlist, libraries, downloads, the account), the calendar database calendar.db, covers you uploaded, the AniDB My List export if you uploaded one, and caches |
Your media and download folders are not part of AniFlow's backup; back those up the way you already do.
The simplest complete backup is a copy of both folders taken while the container is stopped:
docker compose stop aniflow
cp -a /docker/aniflow/config /backup/aniflow-config
cp -a /docker/aniflow/data /backup/aniflow-data
docker compose start aniflow
With the Docker CLI, use docker stop aniflow and docker start aniflow instead.
Use your own host paths. Copying while the container is stopped matters because the databases are SQLite files that are being written while AniFlow runs.
Keep data/calendar.db in your backup. It holds the calendar's permanent ids, the evidence behind each link between a calendar entry and your anime, and the memory of seasons that sources have stopped reporting. A download of the calendar does not bring that back. AniFlow migrates this file when it changes and never deletes it.
The built-in backup (Settings -> Backup)
If you do not want to stop the container, or you want to move an installation to other hardware, use Settings -> Backup. It makes one zip file and lets you choose parts of it again when you restore.
Export
Tick the parts you want and press Download backup. The parts are:
- Configuration (aniflow.yaml) - the settings file.
- Indexers, RSS sources and subgroup profiles - the YAML files in
/config/indexers,/config/rss_sourceand/config/subgroup. - Watchlist, libraries and downloads (aniflow.db) - the main database, including the account and the paired TVs.
- Calendar (calendar.db) - the calendar database.
- Covers you uploaded.
- AniDB My List export - only present if you uploaded one.
- Calendar art (can be fetched again) - large, and off by default. Leave it off unless you want the exact same pictures.
The databases are copied with SQLite's own backup function, so the export is consistent even while AniFlow is running.
Not in the built-in backup: the log, the Activity list, the AniDB title list (it is downloaded again), the cover cache, and your custom themes in /config/themes. If you made your own theme, copy the /config folder as well.
The backup zip contains secrets: the download client and proxy passwords, the Shoko key and the TV pairing tokens. Keep it private and do not share it with anyone. (The diagnostics file, in contrast, has secrets removed; see Troubleshooting and Checks.)
Restore
- Go to Settings -> Backup, section Import, and press Choose backup file....
- AniFlow checks the file first: every checksum, every file name, and the database version. Nothing changes yet. A file from a newer AniFlow than yours is refused with "update AniFlow first"; a file from an older one is accepted and its parts are brought up to date.
- Tick the parts to restore. Optionally tick Keep this machine's paths and URLs: it leaves the download client, Shoko, proxy and timezone settings and the libraries' folders as they are here. Use it when restoring onto different hardware.
- Press Restore. What is about to be replaced is saved first in
/data/backups(the five newest are kept). - When asked, restart AniFlow so every part picks up the restored data (
docker compose restart aniflowordocker restart aniflow).
Things to know:
- Restoring the database replaces this installation's watchlist, libraries, downloads and the account. You sign in again with the backup's username and password.
- Files (covers, indexer files and so on) are only added or replaced, never deleted.
- If the backup's libraries point at folders that do not exist on this machine, AniFlow tells you which; fix them on the Libraries page.
Restoring from a folder copy
- Stop the container:
docker compose stop aniflow(ordocker stop aniflow). - Put the
configanddatafolders back where your compose file mounts them. Make sure the user in your compose file (user: "1000:1000") owns them. - Start the container:
docker compose up -d(ordocker start aniflow).
Migrations run at every start and bring older data forward automatically, so a backup from an earlier AniFlow version works with a newer image.
Updating AniFlow
The image is aniflow/aniflow. To update, use the normal Docker way:
docker compose pull
docker compose up -d
With the Docker CLI:
docker pull aniflow/aniflow:latest
docker stop aniflow
docker rm aniflow
# then run the same docker run command again
At every start, before the application comes up, AniFlow applies any pending database migrations. Your data and settings are untouched otherwise. Settings -> About shows the database state; if it says it is behind, a migration failed and the log from the start of the container will say why.
Take a backup before updating, especially while AniFlow is in alpha.
Image tags
latest follows the newest release. To stay on a version, put the exact version in your compose file (or at the end of your docker run command) and update it yourself when you are ready:
image: aniflow/aniflow:0.9.0
Downgrading
Downgrading is not supported. Migrations only move the database forward, and an older AniFlow cannot be expected to read a database written by a newer one. If an update goes wrong, restore the backup you took before it and run the older image tag.
What survives deleting the container
Everything in /config and /data, as long as those are bind mounts or volumes outside the container, which is how the example compose file sets them up. Nothing inside the container is kept: you can remove and recreate it (docker compose down followed by up -d) at any time. docker compose down does not delete bind-mounted folders.
What can be deleted
/data/cover-cacheholds cover pictures fetched from the metadata sources. It can be deleted at any time; each cover is fetched again the first time it is shown. (This is separate from/data/covers, which holds covers you uploaded and which nothing brings back.)/data/calendar-artholds calendar pictures that are fetched again by themselves./config/logholds the log files. They rotate by themselves./data/calendar.dbmust not be deleted (see above).
Erasing everything
AniFlow has no data outside the two folders. To remove all trace: stop and remove the container, then delete the config and data folders. Your media and download folders are not touched by this. The next start behaves like a first start, with a new one-time setup code in the log.