Re: Missing files in pg_xlog, pg_subtrans and pg_clog directoriesduring file system based backup - Mailing list pgsql-admin

From Stephen Frost
Subject Re: Missing files in pg_xlog, pg_subtrans and pg_clog directoriesduring file system based backup
Date
Msg-id 20171212134630.GD4628@tamriel.snowman.net
Whole thread Raw
In response to Missing files in pg_xlog, pg_subtrans and pg_clog directoriesduring file system based backup  (preeti soni <preeti_soni123@yahoo.com>)
Responses Re: Missing files in pg_xlog, pg_subtrans and pg_clog directoriesduring file system based backup  (preeti soni <preeti_soni123@yahoo.com>)
List pgsql-admin
Greetings,

* preeti soni (preeti_soni123@yahoo.com) wrote:
> While performing file system based backup, after running pg_start_backup, we create a list of files in data directory
calledcollect file.Then backup the files listed in collect file.
 
> This is approximately 35TB database. Very frequently we are noticing there are failed files in pg_xlog, pg_subtrans
andpg_clog directory. It means, the files were present when list of files is created (Collect file). However, it is not
therewhile backing up.
 
> Is the backup valid with these failed files. Any suggestion would help us.

Yes, files come and go during the backup and therefore you are likely to
have a difference between the set of files found when you create the
manifest vs. when the backup actually runs, and that should all be fine.

There's a couple different well maintained backup tools for PG which you
could (and probably should, imv) be using instead of having to guess at
these kinds of questions.

Other things that you need to be doing with a backup tool of your own is
ensuring that the WAL files created during the backup are archived and
sync'd to disk using either archive_command or through a physical
replication slot or similar (using pg_receivewal, for example).

Note that you must also verify at the end of the backup that all WAL
generated between the start backup and the stop backup have been
reliably stored.  You can determine what WAL is required based on the
information returned from the pg_start/stop_backup calls in more modern
versions of PG.  An online backup of PG isn't valid unless you have all
of that WAL.

Thanks!

Stephen

Attachment

pgsql-admin by date:

Previous
From: Léo FERLIN SUTTON
Date:
Subject: Slow pg_dump affecting pg_upgrade speed
Next
From: pinker
Date:
Subject: pg_upgrade --link from 9.4 to 10