PageSourceSearch

https://halo-plugin-migrate.pages.dev/assets/provider_halo.md.DGz-8Cgy.lean.js

js halo-plugin-migrate.pages.dev collected 2026-10-03 05:12:16 UTC 8,119 bytes, 1 lines download raw bytes

1import{_ as r,o as e,c as l,$ as o}from"./chunks/framework.QO2H0moR.js";const t="/assets/halo-provider-data-export.C6N65e8r.png",p="/assets/halo-provider-migrate-plugin.HEAzWpl1.png",f=JSON.parse('{"title":"Halo 1.x 数据迁移指引","description":"","frontmatter":{},"headers":[],"relativePath":"provider/halo.md","filePath":"provider/halo.md","lastUpdated":1776239295000}'),s={name:"provider/halo.md"};function h(i,a,n,u,d,c){return e(),l("div",null,[...a[0]||(a[0]=[o('<h1 id="halo-1-x-数据迁移指引" tabindex="-1">Halo 1.x 数据迁移指引 <a class="header-anchor" href="#halo-1-x-数据迁移指引" aria-label="Permalink to &quot;Halo 1.x 数据迁移指引&quot;">​</a></h1><p>本指引提供了从 <code>Halo 1.5 / 1.6</code> 文件迁移至 <code>Halo 2.x</code> 的方案。</p><h2 id="前置需求" tabindex="-1">前置需求 <a class="header-anchor" href="#前置需求" aria-label="Permalink to &quot;前置需求&quot;">​</a></h2><p>由于 Halo 2.0 的底层架构变动,无法兼容 1.x 的数据,导致无法平滑升级,所以需要进行数据迁移。为此,我们提供了从 Halo 1.5 / 1.6 版本迁移的方案。在进行迁移之前,<strong>有几点注意事项和要求,如果你目前无法满足,建议先暂缓迁移。</strong></p><ul><li>Halo 版本必须为 1.5.x 或 1.6.x。如果不满足,需要先升级到 1.5.x 或 1.6.x 版本。</li><li>Halo 2.0 不兼容 1.x 的主题,建议在升级前先查询你正在使用的主题是否已经支持 2.0。你可以访问 <a href="https://github.com/halo-sigs/awesome-halo" target="_blank" rel="noreferrer">halo-sigs/awesome-halo</a> 或 <a href="https://halo.run/store/apps?type=THEME" target="_blank" rel="noreferrer">应用市场</a> 查阅目前支持的主题。</li><li>Halo 2.0 目前没有内置 Markdown 编辑器,如果需要重新编辑迁移后的文章,需要额外安装 Markdown 编辑器插件。目前社区已经提供了以下插件: <ul><li>StackEdit:<a href="https://halo.run/store/apps/app-hDXMG" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-hDXMG</a></li><li>ByteMD:<a href="https://halo.run/store/apps/app-HTyhC" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-HTyhC</a></li></ul></li><li>Halo 2.0 不再内置友情链接、日志、图库等模块,需要安装额外的插件,目前官方已提供: <ul><li>链接管理:<a href="https://halo.run/store/apps/app-hfbQg" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-hfbQg</a></li><li>图库:<a href="https://halo.run/store/apps/app-BmQJW" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-BmQJW</a></li><li>瞬间(原日志):<a href="https://halo.run/store/apps/app-SnwWD" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-SnwWD</a></li></ul></li><li>Halo 2.0 不再内置外部云存储的支持。需要安装额外的插件,目前官方已提供: <ul><li>S3(兼容国内主流的云存储):<a href="https://halo.run/store/apps/app-Qxhpp" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-Qxhpp</a></li><li>阿里云 OSS:<a href="https://halo.run/store/apps/app-wCJCD" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-wCJCD</a></li></ul></li><li>在迁移过程中不会保留旧版本的用户数据,迁移完成之后,关于文章等数据的关联都将改为 Halo 2.0 的新用户。</li><li>为了防止直接升级 2.0 导致 1.x 的数据受到破坏,我们已经将工作目录由 <code>~/.halo</code> 变更为 <code>~/.halo2</code>。</li><li>目前 Halo 2.0 仅提供 Docker 部署方式,没有提供可执行 JAR 包,但可以自编译,请参考 <a href="https://docs.halo.run/developer-guide/core/build" target="_blank" rel="noreferrer">构建</a> 文档</li><li>可以考虑先在本地运行一个 Halo 2.0,模拟一下导入,检查导入后是否满足要求。</li></ul><p>如果遇到了迁移过程中的问题,也可以向我们提交 Issue: <a href="https://github.com/halo-dev/halo/issues/new/choose" target="_blank" rel="noreferrer">https://github.com/halo-dev/halo/issues/new/choose</a>,以上暂不支持的功能我们也会陆续完善。</p><h2 id="备份数据" tabindex="-1">备份数据 <a class="header-anchor" href="#备份数据" aria-label="Permalink to &quot;备份数据&quot;">​</a></h2><p>在进行迁移操作之前,我们强烈建议先<strong>完整备份所有数据</strong>,可以参考 <a href="https://docs.halo.run/user-guide/backup-migration" target="_blank" rel="noreferrer">备份迁移</a> 进行整站备份。</p><h2 id="导出数据文件" tabindex="-1">导出数据文件 <a class="header-anchor" href="#导出数据文件" aria-label="Permalink to &quot;导出数据文件&quot;">​</a></h2><p>在 Halo 1.5.x / 1.6.x 后台的小工具中提供了数据导出的功能,将最新的数据进行备份,然后下载即可。这个数据文件包含了数据库所有的数据,后续我们在 2.0 的导入插件中就是通过这个文件进行数据导入。</p><p><img src="'+t+'" alt="halo-data-export.png" data-zoomable=""></p><h2 id="移动附件" tabindex="-1">移动附件 <a class="header-anchor" href="#移动附件" aria-label="Permalink to &quot;移动附件&quot;">​</a></h2><ul><li>本地存储的附件,只需要将 1.x 工作目录的 <code>upload</code> 目录里面的所有文件夹移动到 2.0 工作目录下的 <code>attachments/migrate-from-1.x</code> 文件夹即可。</li><li>云存储的附件迁移会在迁移过程中进行。</li></ul><h2 id="安装插件" tabindex="-1">安装插件 <a class="header-anchor" href="#安装插件" aria-label="Permalink to &quot;安装插件&quot;">​</a></h2><p>在迁移过程中,需要提前安装必要的插件:</p><ul><li>链接管理:<a href="https://halo.run/store/apps/app-hfbQg" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-hfbQg</a></li><li>图库:<a href="https://halo.run/store/apps/app-BmQJW" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-BmQJW</a></li><li>瞬间(原日志):<a href="https://halo.run/store/apps/app-SnwWD" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-SnwWD</a></li><li>S3(如果需要迁移存在云存储的附件,需要安装):<a href="https://halo.run/store/apps/app-Qxhpp" target="_blank" rel="noreferrer">https://halo.run/store/apps/app-Qxhpp</a></li></ul><h2 id="配置存储策略-可选" tabindex="-1">配置存储策略(可选) <a class="header-anchor" href="#配置存储策略-可选" aria-label="Permalink to &quot;配置存储策略(可选)&quot;">​</a></h2><blockquote><p>如果在 Halo 1.x 中未使用云存储,可以跳过此步骤。</p></blockquote><ol><li>安装 S3 插件。</li><li>进入附件管理页面。</li><li>点击页面右上角的 <strong>存储策略</strong> 按钮。</li><li>创建存储策略,选择 <strong>S3 Object Storage</strong>。</li><li>填写相关配置,点击 <strong>保存</strong> 即可。</li></ol><h2 id="迁移" tabindex="-1">迁移 <a class="header-anchor" href="#迁移" aria-label="Permalink to &quot;迁移&quot;">​</a></h2><ol><li><p>点击左侧菜单的迁移进入迁移页面。</p></li><li><p>在选择渠道步骤中,选择 <strong>Halo</strong>,点击下一步。</p><p><img src="'+p+'" alt="halo-provider-migrate-plugin" data-zoomable=""></p></li><li><p>在导入数据步骤中,点击 <strong>选择文件</strong> 按钮,选择在 Halo 1.5.x / 1.6.x 导出的数据文件(JSON 格式),之后点击下一步。</p></li><li><p>
1如果存在需要迁移的附件,则会出现 <strong>设置附件存储策略</strong> 步骤,此时选择之前创建的存储策略即可。完成之后点击下一步。</p></li><li><p>在待迁移数据步骤中,可以再次审查待迁移的数据,审查结束后点击 <strong>执行导入</strong> 后,耐心等待即可,数据迁移完成后会有弹窗进行提示。</p></li></ol>',21)])])}const b=r(s,[["render",h]]);export{f as __pageData,b as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.