Backups and updates
Where the content lives, how to back it up and restore it, and how to update the app without losing anything.
Where the content lives
Everything you write is in PostgreSQL: projects, pages, entries, translations, revisions, languages, users, tokens and settings. The uploaded images are in the databases folder (with Docker, the documents-data volume). Keep both.
Backups
npm run backupThis writes backups/documents-YYYY-MM-DD-HHmm.backup with every table of the database and the uploaded images. Copy the backups to another place too.
Restore
Stop the app, then:
npm run restore -- backups/documents-2026-11-15-1030.backupThe tables are replaced by the ones of the backup, and the current databases folder is kept as databases-before-restore-<date>.
Updating the app
The database and the databases folder are not part of the code: a git pull or a new Docker image never replaces them.
git pull
npm install
npm run releaseWhen a new version of the app brings a new version of this documentation, Documents first makes an automatic backup (backups/…-update.backup, the last 10 are kept) and then updates only the example project. Your projects are never touched.
Do not copy a new databases folder over your own one.
Coming from an older Documents
Older versions kept everything in NoSQL files in the databases folder. Stop the app, put database in the config file and copy the files once into the empty tables:
node tools/migrate-nosql.js databasesIt copies every collection, the revisions too, and checks the count of each table. The files are not changed.