Skip to content

Backup & Restore

Orimora includes an automated backup system that creates daily database dumps and weekly Markdown exports.

Add the following environment variables to your .env file:

BACKUP_ENABLED=true
BACKUP_PATH=/backups/orimora
BACKUP_RETENTION_DAILY=7
BACKUP_RETENTION_WEEKLY=4
BACKUP_SCHEDULE=0 3 * * *
VariableDescriptionDefault
BACKUP_ENABLEDEnable automated backupsfalse
BACKUP_PATHDirectory for backup files/backups/orimora
BACKUP_RETENTION_DAILYDaily DB dumps to keep7
BACKUP_RETENTION_WEEKLYWeekly Markdown exports to keep4
BACKUP_SCHEDULECron expression (UTC)0 3 * * *

A full PostgreSQL dump using pg_dump --format=custom. This is the primary backup method and captures all data including documents, users, settings, and metadata.

Every Sunday, Orimora exports all collections as ZIP files containing Markdown files with YAML frontmatter. These are human-readable and can be imported into other systems (including Obsidian).

  • Redis: Configure Redis persistence (BGSAVE) separately — sessions will regenerate if lost.
  • Uploads: Use rsync or S3 sync to back up the /uploads/ directory.

Navigate to Settings → Admin → Backups to:

  • View current backup status and health
  • Browse backup history
  • Manually trigger a backup
Terminal window
# Stop the application
docker compose stop app
# Restore the database
pg_restore --clean --if-exists --dbname=knowledgebase /backups/orimora/orimora-db-TIMESTAMP.dump
# Restore uploads
rsync -av /backup-source/uploads/ /app/uploads/
# Restart
docker compose up -d app

Import a Markdown ZIP file via Settings → Collection → Import.

Use the built-in revision history to restore any previous version of a document.

The system alerts when the last successful backup is older than 48 hours. Use the status API for external monitoring:

Terminal window
GET /api/admin/backup.status

Returns healthOk: true/false and details about the last backup.