When it's really necessary to enable WAR archiving in case of low level backups?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

we are currently implementing low level backups using pg_start_backup
and pg_stop_backup. While the roadmap already contains moving to
pg_basebackup or even barman, I would like to better understand some
aspects of what's in use currently. The first thing one is advised to
do in case of low level backups is the following:

> 1. Ensure that WAL archiving is enabled and working.

https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-BASE-BACKUP

"archive_command" can be an arbitrary shell command copying WAL
segments anywhere and between "pg_start_backup" and "pg_stop_backup"
the docs make clear that arbitrary file system tools can be used as
well to copy things around.

So, when "archive_command" is enabled and working before
"pg_start_backup" is executed, one has to deal with the I/O-load of
copying the base files and creating the WAL archives at the same time.
But those latter archives are only needed before "pg_stop_backup" gets
executed, depending on the given arguments even afterwards in theory.
But before is enough already to save I/O.

So, looking at consistency of the backup, would it be OK to actually
only archive WALs when copying base files has finished? Or is there a
reason the docs put that at the first advise I obviously didn't
understand yet?

>From my understanding, without actually archving WAL segments, the
WAL would simply grow until archiving gets enabled, without any
influence on if the backup is consistent or not. The only point is
that one must not forget to enable WAL archiving at all and keep 
those segments created during backup "pg_stop_backup" tells about.

Thanks!

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail: Thorsten.Schoening@xxxxxxxxxx
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow







[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux