AniFlow

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.

FolderWhat is in it
/configThe settings file aniflow.yaml, the log, your indexer, feed and subgroup profile files, and your own themes
/dataThe 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.

Important

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:

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.

Careful

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

  1. Go to Settings -> Backup, section Import, and press Choose backup file....
  2. 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.
  3. 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.
  4. Press Restore. What is about to be replaced is saved first in /data/backups (the five newest are kept).
  5. When asked, restart AniFlow so every part picks up the restored data (docker compose restart aniflow or docker restart aniflow).

Things to know:

Restoring from a folder copy

  1. Stop the container: docker compose stop aniflow (or docker stop aniflow).
  2. Put the config and data folders back where your compose file mounts them. Make sure the user in your compose file (user: "1000:1000") owns them.
  3. Start the container: docker compose up -d (or docker 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

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.