[ZODB-Dev] RelStorage, PostgreSQL backup method comparison
Sean Upton
sdupton at gmail.com
Wed Dec 26 17:43:09 UTC 2012
For cron job RelStorage backups (databse not including blobs backed-up
seperately, using a PostgreSQL 9.0.x backend), I use both zodbconvert
to save FileStorage copies of my database, and pgdump for low-level
binary dumps (pg_restore custom format, preserving postgres OIDs).
bzip2-compressed, the pgdump backups are always ~2.5 times the size
versus the compressed FileStorage -- this puzzles me.
I'm using something in my bash backup script that looks like:
$PGDUMP -Fc -o -h $SOCKET_HOST -p $SOCKET_PORT $dbname | bzip2 -c -
> $DESTDIR/pgdump-$dbname-$DATESTAMP.bz2
One database that backs up to 45MB bz2-compressed FileStorage file
equates to a 123MB bz2-compressed pgdump custom-format file. I would
expect such a ratio in running size, but not in compressed backups of
similar data.
Generally, I'm wondering, for the same data, what it is that makes my
high-level FileStorage dump so much smaller in comparison to the
lower-level pgdump alternative? Anyone with hunches or PostgreSQL
kung-fu to add insight?
Side-note: the zodbconvert script seems a perfectly viable mechanism
for ZODB backup (regardless of whether one uses a RelStorage backend),
but I am not sure if anyone else does this.
Sean
More information about the ZODB-Dev
mailing list