From: Stephen Frost <sfrost@snowman.net>
To: Srinivasa T N <seenutn@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Setting up a server with previous day data
Date: Tue, 23 Aug 2022 15:43:11 -0400
Message-ID: <20220823194311.GA31055@tamriel.snowman.net> (raw)
In-Reply-To: <CAFruNddwg1QHJD75rH_swG_+TVMHiCxLU8pOouxxJH=mz-YUHw@mail.gmail.com>
References: <CAFruNddwg1QHJD75rH_swG_+TVMHiCxLU8pOouxxJH=mz-YUHw@mail.gmail.com>
Greetings,
* Srinivasa T N (seenutn@gmail.com) wrote:
> I have a primary postgresql 12 server which is being continuously used
> for transaction processing. For reporting purposes, I want to set up a
> secondary server which has got previous day data. Everyday night, I want
> the data from primary to be shifted to secondary. I can achieve this
> manually using pg_basebackup on primary and pg_restore on secondary. Is
> there any other automated efficient way to achieve the same? Any relevant
> docs would be helpful.
You might consider checking out pgbackrest and the incremental backup
and delta restore options that it has. Incremental backups will only
copy files from the PG server that have changed since the last backup,
and the delta restore option will only update the files that are
different between the backup and the files that are in place.
pgbackrest is also able to parallelize these operations.
(this use-case, more-or-less, was part of the original reason pgbackrest
was developed, btw)
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: sfrost@snowman.net, seenutn@gmail.com
Subject: Re: Setting up a server with previous day data
In-Reply-To: <20220823194311.GA31055@tamriel.snowman.net>
References: <CAFruNddwg1QHJD75rH_swG_+TVMHiCxLU8pOouxxJH=mz-YUHw@mail.gmail.com> <20220823194311.GA31055@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox