<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Restic &#8211; mylogs.cn</title>
	<atom:link href="https://mylogs.cn/tag/restic/feed/" rel="self" type="application/rss+xml" />
	<link>https://mylogs.cn</link>
	<description>发现、记录、分享</description>
	<lastBuildDate>Thu, 06 Aug 2026 20:40:43 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>存了三份，照样找不回上周二那版</title>
		<link>https://mylogs.cn/%e5%ad%98%e4%ba%86%e4%b8%89%e4%bb%bd%ef%bc%8c%e7%85%a7%e6%a0%b7%e6%89%be%e4%b8%8d%e5%9b%9e%e4%b8%8a%e5%91%a8%e4%ba%8c%e9%82%a3%e7%89%88/</link>
					<comments>https://mylogs.cn/%e5%ad%98%e4%ba%86%e4%b8%89%e4%bb%bd%ef%bc%8c%e7%85%a7%e6%a0%b7%e6%89%be%e4%b8%8d%e5%9b%9e%e4%b8%8a%e5%91%a8%e4%ba%8c%e9%82%a3%e7%89%88/#respond</comments>
		
		<dc:creator><![CDATA[steve, zhang]]></dc:creator>
		<pubDate>Thu, 06 Aug 2026 20:40:43 +0000</pubDate>
				<category><![CDATA[经验与技巧]]></category>
		<category><![CDATA[Restic]]></category>
		<category><![CDATA[命令行]]></category>
		<category><![CDATA[开源工具]]></category>
		<category><![CDATA[数据备份]]></category>
		<category><![CDATA[数据安全]]></category>
		<guid isPermaLink="false">https://mylogs.cn/%e5%ad%98%e4%ba%86%e4%b8%89%e4%bb%bd%ef%bc%8c%e7%85%a7%e6%a0%b7%e6%89%be%e4%b8%8d%e5%9b%9e%e4%b8%8a%e5%91%a8%e4%ba%8c%e9%82%a3%e7%89%88/</guid>

					<description><![CDATA[外置硬盘拖一份、云盘自动同步一份、第二块硬盘再放一份——你大概也是这么给自己壮胆的。MakeUseOf 撰稿人 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">外置硬盘拖一份、云盘自动同步一份、第二块硬盘再放一份——你大概也是这么给自己壮胆的。MakeUseOf 撰稿人 Afam Onyimadu 这样存了好几年，直到他要找一份改动前的表格，翻遍三个地方，拿到的全是同一个「此刻」的版本。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a751553eda27&quot;}" data-wp-interactive="core/image" data-wp-key="6a751553eda27" class="wp-block-image size-large aligncenter wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1200" height="675" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://mylogs.cn/wp-content/uploads/2026/08/b92e61375cb2175d86575b6501056e6f_header.webp" alt="存了三份，照样找不回上周二那版" class="wp-image-3866" style="max-width:100%;height:auto;" srcset="https://mylogs.cn/wp-content/uploads/2026/08/b92e61375cb2175d86575b6501056e6f_header.webp 1200w, https://mylogs.cn/wp-content/uploads/2026/08/b92e61375cb2175d86575b6501056e6f_header-300x169.webp 300w, https://mylogs.cn/wp-content/uploads/2026/08/b92e61375cb2175d86575b6501056e6f_header-1024x576.webp 1024w, https://mylogs.cn/wp-content/uploads/2026/08/b92e61375cb2175d86575b6501056e6f_header-768x432.webp 768w" sizes="(max-width: 1200px) 100vw, 1200px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">图片来源：MakeUseOf</figcaption></figure>





<p class="wp-block-paragraph">我的判断是：这不是备份做得不够多，而是从头到尾就没做备份。副本只保存当下，删除会同步、覆盖会同步；勒索软件加密了本机文件，同步一跑，三份一起完蛋。</p>



<h2 class="wp-block-heading">先分清副本和备份</h2>



<p class="wp-block-paragraph">四个问题一问就明白：能取回昨天的版本吗？能确认备份文件本身完好吗？除了最新版还留着别的版本吗？今天的改动会不会覆盖昨天的备份？副本的答案基本都是否，而快照式备份工具的答案都是是。</p>



<h2 class="wp-block-heading">用 Restic 建一个带历史的仓库</h2>



<p class="wp-block-paragraph">Restic 是免费开源的命令行备份工具，Windows、macOS、Linux 都能用。它不复制文件夹，而是给每次备份拍一张快照，记录那一刻的完整状态，且只存变化的部分，留一长串历史并不怎么占空间。按官方快速上手，流程是这样：</p>



<ol class="wp-block-list"><li>先设好仓库位置和密码两个环境变量：<code>RESTIC_REPOSITORY</code> 指向存放目录，<code>RESTIC_PASSWORD</code> 填一个足够强的密码；</li><li>初始化仓库，只需做一次：<code>restic init</code>；</li><li>备份指定目录：<code>restic backup <目录路径></code>；</li><li>查看历史快照：<code>restic snapshots</code>，记下想要那一版的快照 ID；</li><li>取回文件：<code>restic restore --target <恢复到哪> <快照ID></code>；</li><li>定期体检：<code>restic check</code>，想连数据一起校验就加 <code>--read-data</code>。</li></ol>



<h2 class="wp-block-heading">两点提醒</h2>



<p class="wp-block-paragraph">一是真正的验证得恢复到另一台设备上——本机有隐藏故障时，在本机做的恢复测试看着都正常。二是别把副本一脚踢开，云盘同步、外置硬盘拷贝依旧是跨设备搬运数据最快的办法，只是从今天起别再管它叫备份。</p>



<p class="wp-block-paragraph">一个能回答「上周二那版在哪」的系统，才配叫保险。你手里那份，属于哪一类？</p>



<p class="wp-block-paragraph">来源：MakeUseOf</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mylogs.cn/%e5%ad%98%e4%ba%86%e4%b8%89%e4%bb%bd%ef%bc%8c%e7%85%a7%e6%a0%b7%e6%89%be%e4%b8%8d%e5%9b%9e%e4%b8%8a%e5%91%a8%e4%ba%8c%e9%82%a3%e7%89%88/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
