Sample Header Ad - 728x90

pg_basebackup and multiple tablespaces

1 vote
1 answer
1976 views
I have the following case: - the master database has an additional tablespace - I'm trying to replicate the master with the pg_basebackup tool - the directory / partition layout on the slave is the same as on the master What parameters should I use to set up replication safely? Do I need to map tablespace with **-T** parameter or is it only required if I am doing pg_basebackup on the master? pg_basebackup is generaly safe? Data not be deleted from the master? My command is: db_slave# pg_basebackup -h db_master -p 5433 -U replication -D /var/lib/postgresql/12/main -P -Xs -Fp -R But I get: pg_basebackup: error: directory "/home/db" exists but is not empty pg_basebackup: removing data directory "/var/lib/postgresql/12/main" Tablespace is store in */home/db*. Thanks a lot for all answers.
Asked by don999 (11 rep)
Nov 19, 2021, 10:48 PM
Last activity: Jan 5, 2024, 08:07 AM