使用rsync执行增量备份的脚本

时间:2022-10-13 01:02:47

Could someone help me with a bash script in linux to make backups. would have to do a full backup every week and every day an incremental.

有人可以帮助我使用linux中的bash脚本进行备份。必须每周进行一次完整备份,每天都要增量备份。

4 个解决方案

#1


2  

Feel free to use or borrow ideas from Backup.rsync here.

请随意使用或借用Backup.rsync中的想法。

I actually used to do rsync backups via Backup.rsync, but I've since switched to my backshift program because it deduplicates better (no more O(length^2) storage requirement for large, slow-growing files), and compresses the chunks with xz. If you look it over, you'll likely see that it's inspired by rsync --link-dest.

我实际上曾经通过Backup.rsync进行rsync备份,但我已经切换到我的backshift程序,因为它更好地重复删除(对于大型,生长缓慢的文件不再有O(长度^ 2)存储要求),并压缩块用xz。如果你仔细研究一下,你可能会发现它的灵感来自rsync --link-dest。

#2


3  

I've been using rsnapshot for over four years to keep a rotation of 7 daily, 4 weekly, and 12 monthly snapshots of my Slackware Box. Because it intelligently uses hardlinks, all 23 of these snapshots only take about 30% more space than the entire size of my filesystem.

我已经使用rsnapshot超过四年来保持我的Slackware Box的每日7个,每周4个和每月12个快照的轮换。因为它智能地使用硬链接,所以这些快照中的所有23个仅比我的文件系统的整个大小多大约30%的空间。

#3


2  

I'd recommend rdiff-backup, available on popular distros, and is very capable.

我推荐rdiff-backup,可以在流行的发行版上使用,而且功能非常强大。

It has a Windows build as well!

它也有Windows版本!

#4


0  

You could use the --link-dest switch of rsync to create incrementals. Simply do one full rsync and do a incremental with --link-dest=<path_to_full>.

您可以使用rsync的--link-dest开关来创建增量。只需执行一个完整的rsync并使用--link-dest = 执行增量操作。

#1


2  

Feel free to use or borrow ideas from Backup.rsync here.

请随意使用或借用Backup.rsync中的想法。

I actually used to do rsync backups via Backup.rsync, but I've since switched to my backshift program because it deduplicates better (no more O(length^2) storage requirement for large, slow-growing files), and compresses the chunks with xz. If you look it over, you'll likely see that it's inspired by rsync --link-dest.

我实际上曾经通过Backup.rsync进行rsync备份,但我已经切换到我的backshift程序,因为它更好地重复删除(对于大型,生长缓慢的文件不再有O(长度^ 2)存储要求),并压缩块用xz。如果你仔细研究一下,你可能会发现它的灵感来自rsync --link-dest。

#2


3  

I've been using rsnapshot for over four years to keep a rotation of 7 daily, 4 weekly, and 12 monthly snapshots of my Slackware Box. Because it intelligently uses hardlinks, all 23 of these snapshots only take about 30% more space than the entire size of my filesystem.

我已经使用rsnapshot超过四年来保持我的Slackware Box的每日7个,每周4个和每月12个快照的轮换。因为它智能地使用硬链接,所以这些快照中的所有23个仅比我的文件系统的整个大小多大约30%的空间。

#3


2  

I'd recommend rdiff-backup, available on popular distros, and is very capable.

我推荐rdiff-backup,可以在流行的发行版上使用,而且功能非常强大。

It has a Windows build as well!

它也有Windows版本!

#4


0  

You could use the --link-dest switch of rsync to create incrementals. Simply do one full rsync and do a incremental with --link-dest=<path_to_full>.

您可以使用rsync的--link-dest开关来创建增量。只需执行一个完整的rsync并使用--link-dest = 执行增量操作。