views:

38

answers:

2

I need to back up my database but I don't have enough disk space to dump it. Can I just use duplicity to perform incremental backups on the data directory? Would that corrupt the backup somehow? I don't mind a few of the latest rows missing, but I would like my backup to not be destroyed.

Does anyone know what the case is?

Thanks!

+1  A: 

See this page. I believe duplicity uses rsync type mechanism, so you cannot simply grab the directory and go - see the page of that page about rsync. If you need to do a file system level backup, while online, then you'll need some sort of atomicity like snapshots.

Most likely, the backup simply wouldn't work.

Postgres has lots of backup options though, like PITR. I suggest a read through the fine manual.

rfusca
I *did* read that, and it requires that the base backup and WALs are stored in another directory, which requires twice the space on the DB server... My question is if it's possible to do a backup in-place, from the server to the network.That page does answer this question, though, so thank you, accepted!
Stavros Korokithakis
+1  A: 

No, you can't backup the data directory while the database service is running. You could backup the WAL-segments for a point in time recovery when you want to restore. You have to make sure you test your recovery as well, it's a litte more complicated then pgrestore of an ordinary dump.

Frank Heikens
Thanks, looks like I'll just have to pipe the dump to S3 somehow...
Stavros Korokithakis