From: | Mauricio Fernandez <mmauricio(dot)fernandez(at)gmail(dot)com> |
---|---|
To: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | pg_combinebackup and multiple tablespaces |
Date: | 2025-01-07 15:49:04 |
Message-ID: | CAMdfv4VtBw8+U4fBeSOvC3R5unxEdjG0ecNJxh6O=+wcpYstyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(at)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(at)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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | kasem adel | 2025-01-07 16:26:05 | Re: Advice Needed: Simultaneous Upgrade of Two-Node PostgreSQL 11 Cluster |
Previous Message | Dischner, Anton | 2025-01-07 15:41:24 | AW: Advice Needed: Simultaneous Upgrade of Two-Node PostgreSQL 11 Cluster |