如何用Bacula备份大文件?

发布于 2024-07-08 05:04:50 字数 360 浏览 8 评论 0原文

目前它的大小为 700MB,但可以想象它会增长到超过 1GB。 通常我只是将此文件复制到另一个位置(出于好奇,它是 Zope 实例的数据库, ZODB 文件)。

这个文件每天变化不大,但我知道 Bacula 无法对增量备份进行文件内细分。 无论如何,没关系。 我想做的是每天进行一次完整备份并保留其中两个,每周进行一次完整备份并保留其中两个。 所以 在任何给定时间我都可以得到昨天、前天、一周 前和两周前。 你认为这是个好主意吗?

我想我应该制定两个时间表,每天和每周。 但为了实现这一目标,我应该在卷和池上获得哪些数字? 两卷1.5GB? 欢迎任何提示或指导,我不是系统管理员,我对 Bacula 的经验非常有限。

It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance,
a ZODB file).

This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backups. Anyway, it doesn't matter. What I want to do is a full backup daily and keep two of them and a full backup weekly and also keep two of them. So
at any given time I can get yesterday, the day before yesterday, a week
ago and two weeks ago. Would you think that's a good idea?

I suppose I should make two schedules, daily and weekly. But which numbers should I have on the volumes and the pools to achieve this? Two volumes of 1.5GB? Any hints or guidance is welcome, I'm not a sysadmin and my experience with Bacula is very limited.

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

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

发布评论

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

评论(4

最单纯的乌龟 2024-07-15 05:04:50

在线备份大型数据库文件是一项有风险的业务,因为文件可能会在您读取文件时发生更改,从而导致备份不一致并且可能毫无用处。 我认为您不应该备份 ZODB 文件本身,而应该备份由 repozo 工具每天创建的差异。 这样,您还可以外包处理您认为 Bacula 无法处理的文件内部细分的工作。

Online backup of a large database file is risky business, as the file might change while you are reading it, rendering the backup inconsistent and possibly useless. I believe you should not be making backups of the ZODB file itself, but rather of diffs created daily by the repozo tool. This way, you also outsource the job of handling the inside-the-file subdivisions that you say Bacula is incapable of dealing with.

再浓的妆也掩不了殇 2024-07-15 05:04:50

根据我在 bacula 和备份到磁盘方面的经验,最好每个备份作业保留一个卷。 这样,当作业过期时,文件中就不会出现死空间。 Bacula 可以重复使用整个卷,从而减少磁盘利用率。 在池资源中使用“Set Maximum Volume Jobs = 1”指令。

我会设置两个池,每日一个和每周一次。 将每天的卷保留设置为两天,每周将卷保留设置为两周。 将每日安排在周一至周六,将每周安排在周日。

In my experience with bacula and backup to disk, it is best to keep one volume per backup job. That way there is no dead space in the files as jobs expire. Bacula can reuse the whole volume and it cuts down on disk utilization. Use the "Set Maximum Volume Jobs = 1" directive in the pool resource.

I would set up two pools, a daily and weekly. Set the volume retention to two days in the daily and two weeks in the weekly. Schedule the daily on say, mon-sat, and the weekly on sunday.

深者入戏 2024-07-15 05:04:50

根据您的基础设施,我建议您拍摄要备份的卷的快照以“冻结”它并从那里进行备份。

对于某些备份,我们使用 LVM 快照 (http://tldp.org/HOWTO/ LVM-HOWTO/snapshots_backup.html),以避免锁定我们的任何数据库(我们有 TB 级的数据要备份,锁定会对服务产生巨大影响)

然后,正如您所说,数据库不是移动太多,我会保留 6 天的保留期,日报 6 卷,周报 2 卷。 您的每日任务应该进入增量备份池,而每周任务应该是完整的。

例如,使每周(完整)在周一运行,然后每天(周二至周日)增量运行。 如果您发现数据已损坏,您可以在一周中的任何一天回来,而无需在备份过程中占用太多空间或时间。

编辑:而且......我应该在回答之前检查发布日期。 哈哈。 晚了3年。

Depending on your infrastructure, I would recommend taking a snapshot of the volume you are backing up to "freeze" it and make the backup from there.

For some of our backups we are using LVM snapshots (http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html), to avoid locking any of our databases (we have terabytes of data to backup and a lock would have a huge impact on the service)

Then, as you said that the database is not moving too much, I would go and have a 6 days retention period, 6 volumes for Dailies and 2 volumes for weeklies. Your Dailies should hit the Incremental backup pool, and the Weeklies should be the fulls.

For example, make the Weeklies (Fulls) run on Monday and then an incremental every day (Tue-Sun). This will allow you to come back any day of the week if you realize your data is corrupted, without taking too much space or time during the backup.

EDIT: And... I should check the post dates before answering. Haha. 3 Years late.

倾城月光淡如水﹏ 2024-07-15 05:04:50

对于开源 bacula (bacula.org),最好的想法确实是使用“Set Maximum Volume Jobs = 1”指令。

如果您想要“增量备份的文件内细分”,请考虑 Bacula Systems 的 Delta 插件 - https://www.baculasystems.com/products/bacula-enterprise-plugins/delta

For the open source bacula (bacula.org) the best idea is to use the "Set Maximum Volume Jobs = 1" directive indeed.

If you want the "inside-the-file subdivision for incremental backups", please consider the Delta Plugin from Bacula Systems - https://www.baculasystems.com/products/bacula-enterprise-plugins/delta.

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