A HAIMDALL installation keeps its data in two places. Back up both, on a schedule, and keep copies away from the server.
The PostgreSQL database — articles in every language and every version, folders, accounts, the theme, saved styles, file links, the audit log and import history.
The data volume mounted at
/app/data— uploaded images and attachments, the file registry, and the interface text translations. On Node.js hosting, this is the folderHAIMDALL_DATA_DIRpoints to: copy it with your host's file manager or backup tool.
Take the two backups at the same time, so they match each other.
Backing up the database
Use PostgreSQL's own tools. With the Compose database:
docker compose exec -T postgres pg_dump -U postgres -Fc help_file_site > haimdall-$(date +%F).dump-Fc writes PostgreSQL's compressed custom format, which pg_restore can restore selectively. If you run your own PostgreSQL server, use your usual backup method for it.
Backing up the data volume
Copy the volume's contents into an archive. For a fully consistent copy, stop HAIMDALL for the moment it takes (docker compose stop app, then docker compose start app), since the file registry is rewritten whenever someone uploads a file.
docker run --rm -v <volume-name>:/data:ro -v "$PWD":/backup alpine tar -czf /backup/haimdall-data-$(date +%F).tar.gz -C /data .Replace <volume-name> with the data volume's name: Docker prefixes it with your Compose project's name (by default the folder name), for example haimdall_app-data. docker volume ls lists it.
The built-in data backup
Admins can also download a backup from the editor: System › Backups. It's a zip of every content table plus the uploaded files and translations, useful for a quick copy or for archiving. Note that:
it leaves out passwords and sign-in sessions on purpose, so after restoring from it every account needs a new password;
it can be restored only into a new, empty installation, with HAIMDALL's restore tool (see Restoring from a Backup). That makes it the easy way to move a help site to a new server, or to set up a copy to try things on;
it can't take you back after a bad upgrade: the restore tool won't load it into an installation that has content, or into an older version. Keep the database dump and the volume copy above for that.
Test your backups
Restore a backup to a separate test installation from time to time, and check you can sign in and see your articles. A backup that has never been restored hasn't been proven to work. The quickest test is to restore a System › Backups download into a throwaway installation.