Backups
Database
It is recommended to take regular backups or snapshots of your Postgres database, we recommend daily at a minimum retained for a month for the most safety. You should always take a database backup or server snapshot before upgrading between releases – each release introduces automatic database migrations and changes that are not always backwards compatible.
The specifics of backing up a Postgres database depend on your hosting situation and are not considered in scope for this guide – see the official documentation.
Environment
If your hosting environment does not provide secret storage and environment variables are stored in a .env
file then this file should be backed up after every change, for example to a password manager or other encrypted store. Losing the SECRET_KEY
environment variable for example will result in all encrypted data in the database becoming inaccessible.
Exporting content
Alternatively you can also create backups in HTML, Markdown, or JSON format from Settings → Export. These could also be automated using a script and the associated API endpoints. Documentation for this endpoint can be found here (API documentation).