Move pgBackrest repo?

Поиск
Список
Период
Сортировка
Искать

Move pgBackrest repo?

От:
"Colin 't Hart" <colinthart@gmail.com>
Дата:
Hi all,

What is the best way to move a pgBackrest repo?

It was configured as /var/lib/pgbackrest, but we want to move it to /data/pbackrest to get it off the root partition.

It is being written to continually by archivers from several servers. Since access is over ssh, there's no server component that we can just stop for the duration.

Thanks,

Colin

Re: Move pgBackrest repo?

От:
Ron Johnson <ronljohnsonjr@gmail.com>
Дата:
On Wed, Jan 14, 2026 at 10:24 AM Colin 't Hart <colinthart@gmail.com> wrote:
Hi all,

What is the best way to move a pgBackrest repo?

It was configured as /var/lib/pgbackrest, but we want to move it to /data/pbackrest to get it off the root partition.

It is being written to continually by archivers from several servers. Since access is over ssh, there's no server component that we can just stop for the duration.

The first thing I'd do is start rsyncing from /var/lib/pgbackrest to /data/pbackrest.

I don't, though, know enough about remote PgBackRest configuration to know whether PG on the db servers needs to be stopped for the moment when you reconfigure pgbr on the repo server.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Re: Move pgBackrest repo?

От:
Greg Sabino Mullane <htamfids@gmail.com>
Дата:
On Wed, Jan 14, 2026 at 10:24 AM Colin 't Hart <colinthart@gmail.com> wrote:

What is the best way to move a pgBackrest repo?

* rsync to get things mostly copied
* use 'pgbackrest stop' to prevent it from running
* verify no pgbackrest processes still going
* update the conf file to point to the new dir
* final rsync
* rename the old repo dir so nothing writes to it by accident
* use 'pgbackrest start'

Cheers,
Greg

--
Enterprise Postgres Software Products & Tech Support

FAQ