Sample Exam Questions

From the objective of OSS-DB Exam Silver
S2.4 Backup and restore (File system level backup and restore)

Sample Question

2.26

PostgreSQL 12.4 is running on Linux host X. You stopped the database server, backed up the PGDATA directory with the tar command, copied it to another Linux host Y, and unpacked it. When running PostgreSQL on host Y, what is the most appropriate condition for using the copied database as is?

 
  1. The PostgreSQL version must be the same as host X, 12.4.

  2. The major version of PostgreSQL must be 12 and the minor version 4 or higher.

  3. If the major version of PostgreSQL is 12, the minor version can be either greater than, equal to, or less than 4.

  4. The major version of PostgreSQL must be at least 12.

  5. Any version of PostgreSQL can be used as long as it can run on Linux.

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

Answer and Explanation

A file-system-level backup (physical backup) is the most basic backup strategy, but it requires shutting down database server processes. There is no restriction on the command to take a backup, and you can use the tar command provided with the OS.

The backup can be used as a backup in case of a server crash, and it can also be used to run a copy on another host.

The files that make up a PostgreSQL database depend on the major version of the database. For example, to perform a major upgrade you cannot use the database files as-is, and you must use a SQL-level backup such as pg_dump, or use a data migration utility. On the other hand, since the database files are compatible when the major version is the same, for example, a minor version upgrade requires only the installation of the database program. This is not limited to upgrades, but also applies to running the database server on other hosts using physical backups. That is, physical backups taken in a version 12.4 environment can be used in any minor version, as long as the PostgreSQL server is of major version 12.

Therefore, the correct answer is C.