<?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>ArchiveBox &#8211; mylogs.cn</title>
	<atom:link href="https://mylogs.cn/tag/archivebox/feed/" rel="self" type="application/rss+xml" />
	<link>https://mylogs.cn</link>
	<description>发现、记录、分享</description>
	<lastBuildDate>Sun, 09 Aug 2026 02:46:10 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>收藏的网页说没就没？自己搭个存档站</title>
		<link>https://mylogs.cn/%e6%94%b6%e8%97%8f%e7%9a%84%e7%bd%91%e9%a1%b5%e8%af%b4%e6%b2%a1%e5%b0%b1%e6%b2%a1%ef%bc%9f%e8%87%aa%e5%b7%b1%e6%90%ad%e4%b8%aa%e5%ad%98%e6%a1%a3%e7%ab%99/</link>
					<comments>https://mylogs.cn/%e6%94%b6%e8%97%8f%e7%9a%84%e7%bd%91%e9%a1%b5%e8%af%b4%e6%b2%a1%e5%b0%b1%e6%b2%a1%ef%bc%9f%e8%87%aa%e5%b7%b1%e6%90%ad%e4%b8%aa%e5%ad%98%e6%a1%a3%e7%ab%99/#respond</comments>
		
		<dc:creator><![CDATA[steve, zhang]]></dc:creator>
		<pubDate>Sun, 09 Aug 2026 02:46:10 +0000</pubDate>
				<category><![CDATA[经验与技巧]]></category>
		<category><![CDATA[ArchiveBox]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[开源工具]]></category>
		<category><![CDATA[网页存档]]></category>
		<category><![CDATA[自托管]]></category>
		<guid isPermaLink="false">https://mylogs.cn/%e6%94%b6%e8%97%8f%e7%9a%84%e7%bd%91%e9%a1%b5%e8%af%b4%e6%b2%a1%e5%b0%b1%e6%b2%a1%ef%bc%9f%e8%87%aa%e5%b7%b1%e6%90%ad%e4%b8%aa%e5%ad%98%e6%a1%a3%e7%ab%99/</guid>

					<description><![CDATA[收藏夹看着靠谱，实际只存了一串网址。原站改版、下架或者干脆关停，点开就是一个 404。技术文档、研究资料、多年 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">收藏夹看着靠谱，实际只存了一串网址。原站改版、下架或者干脆关停，点开就是一个 404。技术文档、研究资料、多年前在论坛里翻到的那条冷门解法，丢了往往就再也搜不回来。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a782e7cf1706&quot;}" data-wp-interactive="core/image" data-wp-key="6a782e7cf1706" 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/b2f37556270e0ee24988f8ab518eb814_header.webp" alt="收藏的网页说没就没？自己搭个存档站" class="wp-image-4136" style="max-width:100%;height:auto;" srcset="https://mylogs.cn/wp-content/uploads/2026/08/b2f37556270e0ee24988f8ab518eb814_header.webp 1200w, https://mylogs.cn/wp-content/uploads/2026/08/b2f37556270e0ee24988f8ab518eb814_header-300x169.webp 300w, https://mylogs.cn/wp-content/uploads/2026/08/b2f37556270e0ee24988f8ab518eb814_header-1024x576.webp 1024w, https://mylogs.cn/wp-content/uploads/2026/08/b2f37556270e0ee24988f8ab518eb814_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">MakeUseOf 撰稿人分享了一套自建方案：用开源工具 ArchiveBox 把整页内容留在自己的硬盘上，并做了一次严格验证——先存档，再把原页面彻底下线，看还能不能还原。</p>



<h2 class="wp-block-heading">一、部署</h2>



<ol class="wp-block-list"><li>准备一台 Ubuntu 26.04 虚拟机，4GB 内存，通过 Docker 安装 ArchiveBox。</li><li>版本选稳定的 0.7.4，而不是仍在改版中的 0.9 开发分支，可以少踩不少坑。</li><li>官方 Compose 文件有 278 行，捆了搜索、计划任务、Nginx 等一堆用不上的组件。实际只需要一个服务：镜像 <code>archivebox/archivebox:0.7.4</code>，启动命令 <code>server --quick-init 0.0.0.0:8000</code>，映射 8000 端口，把 <code>./data</code> 挂载到容器内 <code>/data</code>，环境变量把 ALLOWED_HOSTS 设为 <code>*</code>、PUBLIC_INDEX 和 PUBLIC_SNAPSHOTS 都设为 <code>False</code>。</li><li>依次执行三条命令完成初始化、创建管理员并启动面板：</li></ol>



<pre class="wp-block-code"><code>docker compose run --rm archivebox init
   docker compose run --rm archivebox manage createsuperuser
   docker compose up -d</code></pre>



<ol class="wp-block-list"><li>关掉向 Archive.org 回传的开关，保证一切留在本地：<code>docker compose run --rm archivebox config --set SAVE_ARCHIVE_DOT_ORG=False</code>。</li></ol>



<h2 class="wp-block-heading">二、一次快照留下七份副本</h2>



<p class="wp-block-paragraph">抓取完成后，ArchiveBox 保留原地址，同时生成带时间戳的快照，里面包含 Wget 抓下的 HTML 副本、SingleFile 单文件页面、PDF、截图、渲染后的 DOM、正文提取版和 WARC 文件。SingleFile 最接近原貌且可正常浏览，正文提取版只留文字，PDF 和截图作为兜底——结果页看起来更像一份恢复菜单，而不是书签列表。</p>



<h2 class="wp-block-heading">三、把原页面关掉之后</h2>



<p class="wp-block-paragraph">该撰稿人自建了一个含图片、说明文字和一个可下载配置文件的小页面，跑在同一台服务器的 8081 端口，页面里硬编码了标记 COPPER-FINCH-8247 便于核对。以深度 1 抓取快照后，他停掉服务并把源目录整个移走。</p>



<p class="wp-block-paragraph">刷新浏览器，原地址报连接错误，而 8000 端口的存档照常打开：SingleFile 和 Wget 版本保留了排版与图片，PDF、截图、DOM、正文提取里都能搜到那个标记。存档前后用 <code>sha256sum</code> 对那个配置文件做校验，哈希值完全一致。</p>



<h2 class="wp-block-heading">四、配上浏览器扩展才真正好用</h2>



<ol class="wp-block-list"><li>安装 ArchiveBox 官方的 Firefox 扩展。</li><li>在扩展设置里填写本地实例地址，例如 <code>http://192.168.91.136:8000</code>。</li><li>浏览器里若已登录 ArchiveBox，扩展会直接复用该会话，此后一键就能存下当前页面。</li></ol>



<p class="wp-block-paragraph">实测存一篇带多张图片、脚本和广告的长文章，SingleFile、Wget、PDF、截图、DOM 和正文提取全部成功，只有 Original 格式因为目标站不允许被嵌入而报了警告。</p>



<h2 class="wp-block-heading">注意事项</h2>



<p class="wp-block-paragraph">存档掌握在自己手里，责任也一样。虚拟机一旦损坏，没备份 data 目录就前功尽弃。ArchiveBox 也无法保证完美复现需要登录的页面、视频播放器和重度 JavaScript 界面。空间方面：example.com 只占 384KB、17 个文件，加上那个自建测试页涨到 1.5MB、52 个文件，再加一篇长文章就到了 34MB、158 个文件。书签只存网址，存档要存 HTML、图片、PDF、截图、WARC 和元数据，量一大就会明显吃盘，因此值得只留文档、研究资料这类真正需要引用的内容。</p>



<p class="wp-block-paragraph">来源：MakeUseOf</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mylogs.cn/%e6%94%b6%e8%97%8f%e7%9a%84%e7%bd%91%e9%a1%b5%e8%af%b4%e6%b2%a1%e5%b0%b1%e6%b2%a1%ef%bc%9f%e8%87%aa%e5%b7%b1%e6%90%ad%e4%b8%aa%e5%ad%98%e6%a1%a3%e7%ab%99/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
