How to use PostgreSQL pg_basebackup

01 April,2021 by Jack Vamvas

pg_basebackup is  a backup utility for ONLINE file system level backups. used to take base backups of a running PostgreSQL database cluster. pg_basebackup waits for the server checkpoint and then start the Postgres data directory copy

 

These are taken without affecting other clients to the database, and can be used both for point-in-time recovery

Example 

pg_basebackup -U mypostgresuser -p 6666 -v -P -F tar -x -D /mybackup_directory/  -l 11_05_2019

U = username

p = port

v = verbose 

P = Progress report

F = Format of the output 

D = directory for output 

l = label 

 

For a list of switches , go to the Postgres documentation for pg_basebackup

Read more on PostgreSQL

PostgreSQL cheatsheet

 

 


Author: Jack Vamvas (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to use PostgreSQL pg_basebackup


dba-ninja.com