Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation and Management - Backup Method (Point-in-Time Recovery (PITR) Concept and Procedure)

Sample Question


In the context of point-in-time recovery, choose the incorrect option.

  1. Configure postgresql.conf so that the WAL file is archived.
  2. Use the pg_dump command to generate a base backup. 
  3. Restore the base backup for server recovery. 
  4. Set recovery.conf so that the archived WAL file can be applied, and restart the server. 
  5. When the server is restored, change the file name of recovery.conf to recovery.done etc. 

※This sample exam is different from those that appear in the actual OSS-DB Exam.

Answer and Explanation

In point-in-time recovery (PITR), after acquiring a backup at a certain point in time, archive the WAL file.  At the time of recovery, by restoring the contents of the WAL file to the original backup (called base backup), you can return the database to the state just before the failure occurred.

To enable WAL archive, set the wal_level, archive_mode, archive_command parameters in the postgresql.conf file. 

To obtain the base backup, use the pg_basebackup command.  You can obtain it using a lower level API, but since the base backup needs to be a physical copy of the database, you can not use a command to get logical backup like pg_dump. 

In the unlikely event of a failure, when restoring with PITR, the base backup is needed to restore first. 

In order to apply the archived WAL file, you need to set parameters such as restore_command in recovery.conf. 

After the recovery is complete, delete recovery.conf or change it to a different name. So that accidental recovery mode will not be entered when the server is restarted. 

Refer to the manual for the detailed procedure. 

Since it is a matter of choosing what is wrong, the correct answer is B.