Docs

Self-hosted

Backups

Back up the PostgreSQL database and the blobdata volume together. A database dump alone loses the published files.

Back up two things together: the PostgreSQL database, and the volume that holds published files and videos. One without the other restores a library of records whose files are gone.

From the project folder, dump the database inside the container and copy it out. That works from PowerShell as well as a Unix shell, because the redirect happens inside the container:

docker compose exec postgres sh -c 'pg_dump -U sto -Fc sto > /tmp/animsync.dump'
docker compose cp postgres:/tmp/animsync.dump ./animsync.dump

The file volume is named animsync_blobdata when you use the Compose file as shipped (name: animsync). Check with docker volume ls if the install is older and the name differs. From the project folder:

docker run --rm -v animsync_blobdata:/data:ro -v "$PWD":/backup alpine tar czf /backup/blobs.tgz -C /data .

In Windows PowerShell, use ${PWD} in place of $PWD.

Take both before every upgrade. On a Synology, schedule them and include the backup folder in Hyper Backup. The NAS layout is in Synology.