The backups that never recovered are called "candidature papers".
Backup tasks show success, and one more compressed package per day in the directory does not prove that the data can be returned. Files may be copied in writing, passwords unknown, versions incompatible, or backups may be placed in the same disk as the original database. Two objectives are identified:RPO I'm not sure how long it's gonna take to lose the data.RTO Personal content stations may receive one-day data and hours of recovery; the order system is not usually available.
SQLite Do not follow in writing cp
SQLite Looks like there's only one file, but... WAL There might be a pattern. -wal and -shm, direct copying of the main file in operation may be inconsistent. Use priority SQLite Online backup capabilities or command lines provided .backup, allowing the database to produce a consistent copy during the writing period.
sqlite3 /var/lib/myapp/app.db '.backup /var/backups/myapp/app-2026-08-14.db'
sqlite3 /var/backups/myapp/app-2026-08-14.db 'PRAGMA integrity_check;'Expected integrity_check Back ok. The backup directory should not be located in a public static directory, nor should the user of the application be allowed to overwrite all historical copies. If you choose to disable before copying, you clearly stop applying, confirm that the database and associated files have not been written, copy the database and associated files, start and verify, and you cannot rely on guessing.
PostgreSQL Record version and character when using logical backup
pg_dump Enables the export of consistent snapshots when the database continues to be in use, suitable for library migration and routine logical backup. Custom formatting is easy pg_restore Select object and parallel recovery:
pg_dump --format=custom --file=/var/backups/myapp/app-2026-08-14.dump myapp
pg_restore --list /var/backups/myapp/app-2026-08-14.dump | headDatabase-level backups do not necessarily include global roles and privileges, and separate role-defined records are maintained against the recovery goal. PostgreSQL Main version, extension, and encoding. Data are large or large. RPO It's a short time to evaluate physical backup and WAL Archiving, not relying indefinitely on once a day pg_dump.
The backup chain contains key assets other than data
The website restoration usually requires user uploads, environment configuration templates,Caddy Configuration, services unit, Compose File and deployment version records. Whether the key enters the backup is clear: it may not be possible to decrypt the data without backup, which must be encrypted and restricted in access. The code can be recreated from the warehouse, but the record is accurately submitted or mirrored. digest. Separates the list into ones that must be restored, recreated, and discarded. Logs usually only need to keep the investigation window, the cache can be rebuilt, and the database and uploading must have a consistent point of time.
Adoption 3-2-1 Don't count the number of copies.
At least a number of copies are kept, different media are used, and there is one different location. Local backups for the server are easily restored quickly, but disk damage or account numbers may disappear together when they are invaded; the object stores or another controlled machine keeps a remote copy. Set up daily, weekly, monthly reserves for backups, rather than building up until disks are full.
Restarting the exercise must be isolated with a business acceptance.
New temporary directory or stand-alone database, which does not cover production. Record starts, backups are restored, integrity checks are run, and a temporary application pointing to a copy of the recovery are activated. Check the number of articles, up-to-date records, login, upload files and key queries, rather than just watch the database process start. Practice finishes recording actual RTO, missing steps and supporting documents, and a secure and provisional copy. At least once every quarter, the database will be updated, the backup script will be modified or the directory will be adjusted.
Completion criteria
You can point to the recent successful backup, its verification results, location, retention period, restoration of the owner and the time of the last exercise.Health check, switch and quick rollback.
Sources
- SQLite Online Backup APISQLite Documentation
- PostgreSQL Backup and RestorePostgreSQL Documentation
- pg_dumpPostgreSQL Documentation