开发者

Can I just backup postgres's directory while it's running?

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 inc开发者_如何学运维remental 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!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜