Application-consistent database backups
Copying database files while an application is actively writing may not produce a recoverable backup unless the database and backup method support that process. Choose a method appropriate to the engine and the required recovery point.
Agree a database-aware method
- Identify the engine and version, database sizes, write rate and acceptable interruption.
- Choose a supported logical export, physical backup or log-based recovery method for that engine.
- Capture required roles, extensions, configuration and encryption keys in addition to application tables.
- Test restoration into a compatible isolated environment and verify representative application records.
Keep database recovery instructions alongside the backup policy. If point-in-time recovery is required, confirm that the necessary logs are collected and retained without gaps. Ask support to review the method before relying on a generic filesystem copy.
Further reading: PostgreSQL: backup approaches