Hello friends today Pgbackrest restore time target
pgbackrest archive-get –stanza=test
After doing the pre-run checks, we should get the –stanza name from pgbackrest.conf.
In addition, before the backup-restore we made, the existing DB can be backed up as dumpall.
pg_dump test -f backup_.sql
pg_dumpall -f backup_all.sql
It can be used for post-restore control by creating a table.
Even if the DATA folder cannot be completely backed up, files such as postgres.conf and pg_hba MUST be backed up especially
mv /postgres/data /postgres/data_old
pg_ctl stop -D /postgres/data
pgbackrest –stanza=test –log-level-console=info –type=time “–target=2021-06-17 10:00:00.024378+01” –db-path=/postgres/data restore
The pg_hba.conf content is updated after the restore.
mv /postgres/data/pg_hba.conf /postgres/data/pg_hba_17062021.conf
cp /postgres/data_17062021/pg_hba.conf /postgres/data/pg_hba.conf
pg_ctl start -D /postgres/data
pg_ctl reload -D /postgres/data
2,812 views last month, 1 views today