PITR and tar

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PITR and tar
Date: 2007-05-07 18:58:06
Message-ID: 1178564286.23358.7.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-general

The docs recommend using tar to perform a base backup for PITR.

Usually, tar reports notices like:
"tar: Truncated write; file may have grown while being archived."

First of all, is the tar archive still safe if those errors occur?

Second, it seems that it can cause a bad backup to occur if you pass the
"z" option to tar. Instead, piping the output of tar through the
compression program seems to avoid that problem (i.e. "tar cf - ... |
gzip > ..."). I am using FreeBSD's tar, other implementations may be
different.

Are my observations correct, and if so, should they be documented as a
potential "gotcha" when making base backups?

Regards,
Jeff Davis

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Albe Laurenz 2007-05-08 06:47:36 Re: PITR and tar
Previous Message Jim Nasby 2007-05-07 16:03:08 Re: Documentation of pg_badkend_pid and stats functions

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-05-07 19:00:23 Re: Date Math
Previous Message Adrian Klaver 2007-05-07 18:51:01 Re: Date Math