public inbox for [email protected]
help / color / mirror / Atom feedFrom: Mauricio Fernandez <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: pg_combinebackup and multiple tablespaces
Date: Tue, 7 Jan 2025 12:49:04 -0300
Message-ID: <CAMdfv4VtBw8+U4fBeSOvC3R5unxEdjG0ecNJxh6O=+wcpYstyg@mail.gmail.com> (raw)
Hi admins, I have the following situation:
Cluster located at $PGDATA
Two extra tablespaces located in $PGTBS/tbs_laboratorio_02
and $PGTBS/tbs_recetas respectively.
I could generate a base and one incremental backup succesly. Both
using --tablespace-mapping options, like the next commands
[postgres@buda ~]$ pg_basebackup -c fast -D $PGBKP/fisicos/base_plano -R -P
--tablespace-mapping=$PGTBS/tbs_laboratorio_02=$PGBKP/fisicos/base_plano/tbs_laboratorio_02
\
--tablespace-mapping=$PGTBS/tbs_recetas=$PGBKP/fisicos/base_plano/tbs_recetas
[postgres@buda ~]$ pg_basebackup -c fast -P -D $PGBKP/fisicos/viernes
--incremental $PGBKP/fisicos/base_plano/backup_manifest \
--tablespace-mapping=$PGTBS/tbs_laboratorio_02=$PGBKP/fisicos/viernes/tbs_laboratorio_02
\
--tablespace-mapping=$PGTBS/tbs_recetas=$PGBKP/fisicos/viernes/tbs_recetas
And now I'm trying to combine y get a full backup using pg_combinebackup,
but I'am getting errors. I'm assuming the commando need to map de 4
tablespace ditectorys generated throug base backup and incremental backup
The $PGBKP/fisicos/restore exists and is empty, before and after the
command execution.
[postgres@buda ~]$ pg_combinebackup $PGBKP/fisicos/base_plano
$PGBKP/fisicos/viernes -o $PGBKP/fisicos/restore \
--tablespace-mapping=$PGBKP/fisicos/base_plano/tbs_laboratorio_02=$PGBKP/fisicos/restore/tbs_laboratorio_02
\
--tablespace-mapping=$PGBKP/fisicos/base_plano/tbs_recetas=$PGBKP/fisicos/restore/tbs_recetas
\
--tablespace-mapping=$PGBKP/fisicos/viernes/tbs_laboratorio_02=$PGBKP/fisicos/restore/tbs_laboratorio_02
\
--tablespace-mapping=$PGBKP/fisicos/viernes/tbs_recetas=$PGBKP/fisicos/restore/tbs_recetas
pg_combinebackup: error: can't create directory
«/var/lib/pgsql/17/backups/devadv01/fisicos/restore/tbs_recetas»: The file
already exists
pg_combinebackup: deleting output
directory«/var/lib/pgsql/17/backups/devadv01/fisicos/restore/tbs_laboratorio_02»
pg_combinebackup: deleting output directory
«/var/lib/pgsql/17/backups/devadv01/fisicos/restore/tbs_recetas»
pg_combinebackup: deleting the content of the output
directory «/var/lib/pgsql/17/backups/devadv01/fisicos/restore»
I'm at a dead end
Thanks in advance
regards
Mauricio Fernández
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pg_combinebackup and multiple tablespaces
In-Reply-To: <CAMdfv4VtBw8+U4fBeSOvC3R5unxEdjG0ecNJxh6O=+wcpYstyg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox