Project

General

Profile

PostgreSQL PITR backup restoration » History » Version 2

« Previous - Version 2/52 (diff) - Next » - Current version
Amit Belani, 08/21/2015 11:19 PM


PostgreSQL PITR backup restoration

Restoring base backup

Identify the most recent base backup for the database cluster.

If the RAID on the host serving the database is available, identify the recent base backups on it.

[enstore@dmsen03 ~]$ enstore config --show drivestat_server PITR_area
/srv3/enstore/pg_pitr
[enstore@dmsen03 ~]$ ls -lh $(enstore config --show drivestat_server PITR_area)/pg_base_backup/drivestat | tail -2
-rw-r--r-- 1 enstore enstore 2.4M Aug 20 04:30 2015-08-20_04-30-02.tar.xz
-rw-r--r-- 1 enstore enstore 2.4M Aug 21 04:30 2015-08-21_04-30-03.tar.xz

As an alternative, if the RAID on the remote backup host is available, identify the recent base backups on it.

[enstore@dmsen03 ~]$ enstore config --show crons backup_dir
/srv3/enstore/backups
[enstore@dmsen03 ~]$ ls -lh $(enstore config --show crons backup_dir)/pg_base_backup/drivestat | tail -2
-rw-r--r-- 1 enstore enstore 2.4M Aug 20 04:30 2015-08-20_04-30-02.tar.xz
-rw-r--r-- 1 enstore enstore 2.4M Aug 21 04:30 2015-08-21_04-30-03.tar.xz

As a final alternative, if base backups are available only from tape storage, copy the most recent base backup to disk.

Restoring transaction logs

Updating cluster configuration