TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Incremental Backups Using GNU Tar and S3

133 点作者 cirowrc超过 7 年前

14 条评论

rsync超过 7 年前
If you&#x27;re intrigued by using basic unix primitives for tasks like this you&#x27;d probably also be intrigued by a cloud storage product that <i>was built to act like a unix primitive</i>.[1][2]<p>If you&#x27;re interested in point-in-time snapshots, you&#x27;re probably also intrigued by our ZFS platform that gives you day&#x2F;week&#x2F;month&#x2F;quarter&#x2F;year snapshots that you don&#x27;t have to configure or maintain - you just do a &quot;dumb&quot; rsync (or whatever) to us and the snapshots just appear.<p>If you&#x27;re interested in <i>encrypted backups</i> you should look into the &#x27;borg backup&#x27; tool which has become the de facto standard for remote, encrypted, changes-only-upload backups.[3][4]<p>Finally, if S3 pricing is important, you should email us about our &quot;HN Readers&#x27;&quot; discount.<p>[1] <a href="https:&#x2F;&#x2F;www.rsync.net" rel="nofollow">https:&#x2F;&#x2F;www.rsync.net</a><p>[2] Examples: <a href="http:&#x2F;&#x2F;www.rsync.net&#x2F;resources&#x2F;howto&#x2F;remote_commands.html" rel="nofollow">http:&#x2F;&#x2F;www.rsync.net&#x2F;resources&#x2F;howto&#x2F;remote_commands.html</a><p>[3] <a href="https:&#x2F;&#x2F;www.stavros.io&#x2F;posts&#x2F;holy-grail-backups&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.stavros.io&#x2F;posts&#x2F;holy-grail-backups&#x2F;</a><p>[4] <a href="http:&#x2F;&#x2F;rsync.net&#x2F;products&#x2F;attic.html" rel="nofollow">http:&#x2F;&#x2F;rsync.net&#x2F;products&#x2F;attic.html</a>
评论 #15832946 未加载
评论 #15833011 未加载
评论 #15834811 未加载
loeg超过 7 年前
You can do much the same thing with less work using the Tarsnap tool and service. Rather than incremental backup, blocks are deduplicated on the client and only unique blocks are backed up. This has about the same storage efficiency as incremental backups, but has the benefit of not relying upon &quot;full&quot; backup plus incremental diffs to achieve the final snapshot contents.<p>(I have no affiliation with Tarsnap other than Colin seems like a nice guy and I am a customer.)<p>I have full backups configured every 12 hours. Just for example, on my last backup, the total logical size was 12 GB; the compressed size of the undeduplicated blocks was 7.2 GB; the total size of actual new data, uncompressed, was 181 MB; and the final sum uploaded for this new full backup was 72 MB. Logically, Tarsnap stores 2.9 TB of my backups, but after compression and deduplication the &quot;physical&quot; requirement is only 16 GB.<p>For this I pay about 17¢ USD&#x2F;day, or $62&#x2F;year. I could probably try to lower my use storage use somewhat (the largest component of that cost, 13.4¢&#x2F;day) but it hasn&#x27;t been worth my time yet.
评论 #15833577 未加载
funkaster超过 7 年前
I used to have a &quot;poor man&#x27;s time machine&quot; system based on rsync + hard links to files that didn&#x27;t change with new backups. Essentially it was the same concept than time machine. Of course you couldn&#x27;t upload a single &quot;snapshot&quot; because tar wouldn&#x27;t know what&#x27;s a hard link. One advantage of using rsync is that you can also keep track of things you delete.<p>Today I&#x27;m using zfs with real snapshots. For systems with no zfs support (my wife&#x27;s iMac for instance), I have a zfs fs that those systems rsync to, after the rsync is done I create a snapshot. All scripted. The snapshots can be stored in another server for an additional layer of backup, or incrementally send them to s3 if you want.
评论 #15832814 未加载
评论 #15832873 未加载
评论 #15832720 未加载
评论 #15832845 未加载
评论 #15832694 未加载
magnetic超过 7 年前
If you have a large amount of data to backup, cloud storage may be too expensive.<p>My data set is about 8 TB (my wife is a professional photographer), and it would be too expensive to keep in S3, so I have an &quot;offsite backup system&quot; that is hosted at my in-laws. It&#x27;s just a RaspberryPi + an 8 TB drive encrypted with LUKS (in case it gets stolen or tampered with).<p>Every night, the RPi syncs the data from my house with rsnapshot (which is a TimeMachine like tool that uses hard links with rsync over ssh).<p>Because of how rsnapshot works, I can always go there and look for a file in one of the directories: it looks just like the original hierarchy, and I can just browse the filesystem as I would on the original system.<p>I also don&#x27;t have to &quot;trust a 3rd party&quot; that the data is really there. I remember some posts on HN about people who used some backup services successfully... until restore time. I&#x27;m always cautious about the magical &quot;set it and forget it&quot; service that is a black box.<p>The first sync has to be done &quot;on the premises&quot; because of the sheer amount of data to transfer, but then the few daily Gigs of data can easily go over the net while everyone is sleeping.
评论 #15834501 未加载
评论 #15835956 未加载
rasengan超过 7 年前
I would really recommend using duplicity[1]. It supports gpg, incremental backups and more.<p>[1] <a href="http:&#x2F;&#x2F;duplicity.nongnu.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;duplicity.nongnu.org&#x2F;</a>
评论 #15838309 未加载
评论 #15833248 未加载
评论 #15834172 未加载
评论 #15833489 未加载
arca_vorago超过 7 年前
Tar works for small things, but over an arbitrary file number file size combo it becomes unwieldy. Rsync, rbackup, rsnapshot, are great tools based on rsync, and these days Borg has been getting a lot of traction. Bacula is great but complicated to setup and manage. There is a newer very interesting one called Ur that seems promising... And my mind is blanking on some of the others, I&#x27;ll comment when I&#x27;m not mobile so I can look at my list.<p>Also don&#x27;t forget zfs&#x2F;btrfs functions that might be relevant.
评论 #15832643 未加载
bauerd超过 7 年前
Worth checking out for backups is git-annex with remote bup repositories:<p>* <a href="https:&#x2F;&#x2F;github.com&#x2F;bup&#x2F;bup" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bup&#x2F;bup</a><p>* <a href="http:&#x2F;&#x2F;git-annex.branchable.com&#x2F;special_remotes&#x2F;bup&#x2F;" rel="nofollow">http:&#x2F;&#x2F;git-annex.branchable.com&#x2F;special_remotes&#x2F;bup&#x2F;</a>
评论 #15832385 未加载
terrik超过 7 年前
A great, though non-free, backup tool that supports incremental encrypted backups is Arq[0].<p>Arq supports painless back ups to multiple cloud storage providers, with budget enforcements, etc.<p>[0] <a href="https:&#x2F;&#x2F;www.arqbackup.com" rel="nofollow">https:&#x2F;&#x2F;www.arqbackup.com</a>
muxator超过 7 年前
With Btrfs or ZFS the whole concept of incremental backup is reshuffled: basically you have consistent full backups, only occupying the space of a full backup + all the diffs, and you only transfer the changed blocks. It&#x27;s really something with no comparison to other methods.<p>While I love ZFS, let&#x27;s not forget that btrfs has its strengths (a lot more flexibility, mainline support), and, provided that your use case is single disk, Raid 1 or raid 10, has been working super reliably for some years now.
aedocw超过 7 年前
I recently wanted to get backups going in a similar way (incremental with copies on-site and off-site). I ended up using Borg and rclone, sending the backups to s3 compatible Wasabi storage. It&#x27;s been working great, and coupled with zerotier on machines that are not in the house (family members), I ended up with a pretty resilient system that only costs a few dollars per month. I wrote up the details here: <a href="https:&#x2F;&#x2F;localconspiracy.com&#x2F;2017&#x2F;10&#x2F;backup-everything.html" rel="nofollow">https:&#x2F;&#x2F;localconspiracy.com&#x2F;2017&#x2F;10&#x2F;backup-everything.html</a>
boramalper超过 7 年前
I&#x27;m not sure if tar is a good format for backups, due to its extremely sequential nature (<i>e.g.</i> you can&#x27;t get a list of the files in an archive without scanning the whole archive...)
评论 #15832292 未加载
评论 #15832702 未加载
IgorPartola超过 7 年前
Note that one point of failure of this setup is that you are keeping the snapshot&#x2F;index filed locally. Ideally, you want to back those up as well.
atomi超过 7 年前
I use restic to minio stored on a raid1 btrfs system and I love it.
ape4超过 7 年前
You&#x27;d definitely want to do a full backup occasionally.
评论 #15832389 未加载