我可以在 postgres 运行时备份它的目录吗?

发布于 2024-09-11 23:39:57 字数 127 浏览 4 评论 0原文

我需要备份数据库,但没有足够的磁盘空间来转储它。我可以只使用口是心非的方式对数据目录进行增量备份吗?这会以某种方式损坏备份吗?我不介意丢失一些最新行,但我希望我的备份不被破坏。

有谁知道是什么情况吗?

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薄情伤 2024-09-18 23:39:57

请参阅此页面。我相信口是心非使用 rsync 类型机制,因此您不能简单地获取目录并转到 - 查看该页面中有关 rsync 的页面。如果您需要在线进行文件系统级备份,那么您将需要某种原子性,例如快照。

最有可能的是,备份根本不起作用。

Postgres 有很多备份选项,例如 PITR 。我建议通读一下精美的手册。

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.

朕就是辣么酷 2024-09-18 23:39:57

不可以,数据库服务运行时无法备份数据目录。当您想要恢复时,您可以备份 WAL 段以进行某个时间点恢复。您必须确保也测试您的恢复,它比普通转储的 pgrestore 稍微复杂一些。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文