For the complete documentation index, see llms.txt. This page is also available as Markdown.

PostgreSQL Backups

Basic steps to create bare minimum backups.

Sentinel is using PostgreSQL database for all analytics/reports/history data. PostgreSQL should be done on regular bases to eliminate possible data losses in case of disasters.

Standalone Hot Backup

This is the standalone backups which provide fast and consistent data snapshot. These are backups that cannot be used for point-in-time recovery, yet are typically much faster to backup and restore than pg_dump dumps. This backups can not be used for PostgreSQL version migration and can created and restored only on the same major version.

1. Find your PostgreSQL service name (if you don't already have it):

sudo systemctl list-units --type=service | grep -i postgres

2. Stop Sentinel and PostgreSQL:

sudo systemctl stop sentinelsudo systemctl stop [YOUR_POSTGRES_SERVICE]

3. Find your PGDATA path:

sudo -u postgres psql -c "SHOW data_directory;"

4. Clear the existing data directory (replace the path with your PGDATA path from step 3):

sudo -u postgres rm -rf /your/pgdata/folder/*

5. Go to your backup folder (replace the date with your backup folder name):

cd /data/pg_backup/2025-07-17

6. Extract the base backup:

sudo -u postgres tar -xzf base.tar.gz -C /your/pgdata/folder/

7. Extract the WAL files into the pg_wal subfolder:

8. Remove the standby marker file:

Without this step, PostgreSQL will start in read-only replica mode and refuse all writes. There is no obvious error — the service appears healthy but nothing can be saved.

9. Fix permissions:

10. Start the services:

Last updated