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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How do you verify backups?

4 点作者 kaptain将近 3 年前
I have a versioned backup system using a combination of Time Machine (locally) and Arq+B2 (remote) over two laptops. I've done spot checks to verify that my backups aren't corrupted but I can't figure out how users are supposed to verify their backups aren't corrupted. How do people do this? I'm asking this question in a personal context but I would be curious to know what an enterprise/business context looks like too.

3 条评论

369548684892826将近 3 年前
I use rsync to generate and compare checksums of the original against the backup:<p><pre><code> rsync -cavin --info=name2 --no-perms --no-owner --no-group &#x2F;local&#x2F;data&#x2F;path&#x2F; user@host:&#x2F;remote&#x2F;data&#x2F;path&#x2F; | grep -e &#x27;&lt;&#x27; -e &#x27;&gt;&#x27; </code></pre> grep finds difference markers in the output.<p>-c for checksum generation.<p>-n for dry-run mode so rsync doesn&#x27;t transmit files.
ttgurney将近 3 年前
In my own personal use-case: my backups include a file that contains a list of every file that is backed up and each file&#x27;s xxhash.[1] So verification is as simple as running &quot;xxhsum --check&quot; on this file. This is a bit slow, but it&#x27;s much faster than something like SHA-256. And I don&#x27;t know what scheme would be significantly faster. I just threw this together to solve my problem of verifying backups, without doing much research into the problem.<p>The backup is to physical media so that makes this scheme easy. Don&#x27;t know if or how this could be applied to online backups.<p>[1]: <a href="https:&#x2F;&#x2F;cyan4973.github.io&#x2F;xxHash&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cyan4973.github.io&#x2F;xxHash&#x2F;</a>
stop50将近 3 年前
The only real test is to restore and verify. some systems allow mounting an backup, this could be an middle way.