Thread: PITR backup - estimating size

PITR backup - estimating size

From
Mike Blackwell
Date:
I'd like to switch to PITR backups, but have limited disk space.  Is there a way to get a ballpark estimate by monitoring a running system, without actually creating the WAL files and risking filling a filesystem?

Mike

Re: PITR backup - estimating size

From
Fabrízio de Royes Mello
Date:


2012/3/23 Mike Blackwell <mike.blackwell@rrd.com>
I'd like to switch to PITR backups, but have limited disk space.  Is there a way to get a ballpark estimate by monitoring a running system, without actually creating the WAL files and risking filling a filesystem?


Usually each wal segment size is 16MB (16777216 bytes), so you can save this information using "archive_command". Ex:

archive_command = 'du -b %p >> /tmp/xlogsize_history.txt'

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com