Friday , April 26 2024

Pgbackrest Installation

In today’s article, I will tell you about Pgbackrest Installation on PostgreSQL Community 13.

If you have not installed PostgreSQL Community before, you can install it by following the link below.

Briefly, pgBackrest is a backup tool for PostgreSQL. You can get full backup, incremental backup, differantial backup with this tool. You can restore from these backups or simply restore the missing files.

After briefly explaining what pgBackrest is, we can start the installation. First, we install pgBacgrest.

Repository Creation:

The repository is where pgBackRest stores backups and archives WAL segments.

Archiving Configuration:

To put the database in archive mode, we write the following parameters into the postgresql.conf file.

We restart the postgresql service so that the change we made can be active.

Backup

If we are going to backup on the same server, we configure pgBackrest as follows.

If a backup will be made to a different server, we will configure both the master server and the server that we will backup.

The pgBacrest configuration to be done on the master server:

The pgBackrest configuration to be made on the server to be backed up:

To take a backup with pgBackrest, we must first create the backup catalog. After creating, we check the correctness of the operation we have done.

After checking, we can get a full backup with the following command.

Differential backup:

Incremental backup:

We can use the following command to get information about the previously taken backups.

Backup Restore

For full backup restore, we must first stop the postgresql service. After performing the restore process, we can start the service again.

Incremental backup restore:

I hope it will be a useful document for you.

Loading

About Melek Durdu

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories