Export only new data since the last PostgreSQL database export
I have a decent sized PostgreSQL database (approx 6GB & growing). A full backup/export of the database is done every few hours via cron & pg_dump. Specifically, can I export only the changes to the database since the last export? Or per开发者_如何转开发haps run a utility that compares the two exports and appends the differences to the original, etc? I'm trying to save disk space and "cloud" transfer time.
No, you can't. What you could do, is setting up WAL archiving to make incremental backups: http://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL
This can only be done for the whole cluster, not for a single database.
Use differential backup solution, like for example free Duplicity.
But remember to store a database dump - don't store live database files, as your backup will be corrupted.
精彩评论