From: | Asad Ali <asadalinagri(at)gmail(dot)com> |
---|---|
To: | Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com> |
Cc: | Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Basebackup |
Date: | 2024-09-04 08:19:27 |
Message-ID: | CAJ9xe=viYDjheTF4AQ8O2UKjeNrjzSc=m0N6pCYaEVcY8OK_iA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Rajesh,
Here are a few differences between basebackup and rsync.
*pg_basebackup* is easier, as it's a single command with PostgreSQL
support. Data consistency is automatically ensured by postgresql. It
transfers the entire database, potentially high network bandwidth is
required. It is less flexible, due to mostly predefined options.
*rsync *is more complex, it requires multiple manual steps. This method
requires stopping or ensuring the primary server's data directory is in a
consistent state before starting the synchronization, Which can cause
downtime or performance impact. It requires careful handling to ensure data
consistency. It is more efficient with bandwidth, as it only transfers
changes. It is more flexible with control over what gets copied.
*You can use basebackup* if you want a straightforward, reliable way to
create a base backup. If you are looking for a method that integrates
directly with PostgreSQL's replication capabilities.
Network bandwidth and performance impact on the primary server are not
critical concerns. If you want an automated process that requires less
manual intervention.
*You can use rsync* if you have specific requirements for how the data
should be copied (e.g., selective file copying). If you need more control
over the synchronization process or want to optimize for minimal network
usage. If you have a large dataset and want to minimize the data transfer
by only copying changes after an initial sync. If you are comfortable with
handling data consistency and can manage the additional complexity.
Regards,
Asad Ali
On Tue, Sep 3, 2024 at 5:31 PM Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
wrote:
> How different is basebackup from new server with primary host and rsync
> from primary, move to new server and start cluster?
>
From | Date | Subject | |
---|---|---|---|
Next Message | Asad Ali | 2024-09-04 08:28:45 | Re: Duplicate Extended Statistics |
Previous Message | Laurenz Albe | 2024-09-03 14:52:55 | Re: Basebackup |