Hi,
I just start with velero. I see that there are pre/post hook command for backup, but not yet post hook for restore.
SQL dump
File system level backup
Continuous archiving
1) SQL Dump
pg_dumpall s allow to make a "hot" backup and have a consistency backup.
2) File system level backup
The backup of file system must be done when the posgres is runing. Because there is no warranty of the postgres data folder integrity
The doc say :
- An alternative file-system backup approach is to make a "consistent snapshot" of the data directory, if the file system supports that functionality ( atomic snapshot of the state of the file system)
- You can perform a
CHECKPOINT
before taking the snapshot to reduce recovery time
- However, a backup created in this way saves the database files in a state as if the database server was not properly shut down; therefore, when you start the database server on the backed-up data, it will think the previous server instance crashed and will replay the WAL log. This is not a problem; just be aware of it (and be sure to include the WAL files in your backup).
So my question are :
- If I want to use "File system level backup, Do you think that run a post hook backup (CHECKPOINT) is enough to warranty a restore without data corruption ? - is there a way to include WAL file ?
Anyway, if I need to play WAL file, the hook restore annotation could be usefull also