Re: Setting up a server with previous day data

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Srinivasa T N <seenutn(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Setting up a server with previous day data
Date: 2022-08-23 19:43:11
Message-ID: 20220823194311.GA31055@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Srinivasa T N (seenutn(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Koen De Groote 2022-08-23 23:09:30 Question regarding failover behavior
Previous Message Adrian Klaver 2022-08-23 19:27:24 Re: Corrupted Postgresql Microsoft Binaries