lift db
Manage database pro backups with pgBackRest, including WAL archiving and point-in-time recovery (PITR).
lift db
Manage pgBackRest database backups with WAL archiving and point-in-time recovery (PITR). This command is for PostgreSQL databases with pgBackRest configured.
Subcommands
lift db backup
Run a pgBackRest backup (incremental by default).
| Flag | Description | Default |
|---|---|---|
--full | Run full backup instead of incremental | false |
# Run incremental backup
lift db backup
# Run full backup
lift db backup --full
lift db restore
Restore database using pgBackRest PITR. Automatically creates a safety backup before restoring.
| Flag | Description | Default |
|---|---|---|
--time <timestamp> | Target time for PITR (e.g. 2026-02-25 14:30:00) | - |
--type <type> | Restore type: time, latest, or backup-set | time |
# Point-in-time recovery
lift db restore --time "2026-02-25 14:30:00"
# Restore to latest state
lift db restore --type latest
Warning: Database restore stops PostgreSQL, performs the restore, and restarts it. This causes downtime during the restore process.
Related
- lift backup - Tool-level backups with Restic
- lift status - Check container status after restore