rsync 是否制作备份副本或备份副本的历史记录?

发布于 2024-12-14 11:30:36 字数 1012 浏览 0 评论 0原文

许多教程网站提到使用 rsync 进行每小时/每日/每周备份 [1], [2],更有什者声称像 Mac 的 Time Machine 一样设置 rsync [3], [4], [5]。但是当我查看代码时,似乎他们创建了 currentBackup/ 文件夹,下次他们会针对此 currentBackup 进行 rsync 来仅复制过来进行必要的更改,然后删除 currentBackup 并将新文件夹设置为 currentBackup。但是,如果我想要每日备份,就像这样

March-10-44-BC/
March-11-44-BC/
March-12-44-BC/
March-13-44-BC/
March-14-44-BC/
March-15-44-BC/

,那么在 3 月 16 日,我可以“回滚”到 3 月 15 日版本或 3 月 14 日版本。我注意到每个网站都提到了名为硬链接的内容。由于我无法理解这是什么,也许这保留了能够执行“回滚”的信息。如果没有,我该怎么办?保留所有以前的备份和 tar.gz 它们吗?

Many tutorial sites mention making hourly/daily/weekly backups with rsync [1], [2], and even more claim to set up rsync like Mac's Time Machine [3], [4], [5]. But when I look at the code, it seems like they make currentBackup/ folder, next time around they rsync against this currentBackup to only copy over the changes necessary, then delete the currentBackup and set the new folder to be currentBackup. But what if I want daily backups likes so

March-10-44-BC/
March-11-44-BC/
March-12-44-BC/
March-13-44-BC/
March-14-44-BC/
March-15-44-BC/

So on March 16 I can 'roll back' to the March 15 version or the March 14 version. I have noticed each site mentions something called hard links. Since I can't understand what this is, perhaps this retains information capable of performing 'roll backs'. If not, what am I supposed to do? Keep all previous backups and tar.gz them?

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

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

发布评论

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

评论(1

零度° 2024-12-21 11:30:36

出于这些目的,硬链接充当文件的“写入时复制”副本。如果文件未更改,则其硬链接“副本”不会占用任何额外空间。当文件更改时,由于存在硬链接,因此会创建包含更改的新副本。 有关更多信息,请参阅 Wikipedia。

因此,rsync 主要用于备份,但也可以提供一些归档功能。这与 Time Machine 等其他备份软件形成鲜明对比,后者始终自动提供存档和备份。

For these purposes hard links serve as "copy on write" copies of the files. If a file is unchanged, hard linked "copies" of it don't take up any extra space. When the file is changed, because of the hard links, a new copy with the changes is created instead. See Wikipedia for more information.

So rsync does mainly backup, but can provide some archiving functionality as well. This is in contrast to other backup software like Time Machine that always and automatically provide archiving as well as backup.

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