# 对比主题文件

逐行对比任意主题文件在您的在线主题与某个备份之间的差异。

在决定恢复之前，查看单个主题文件（例如 Liquid 模板、样式表或图片）发生了哪些变化。

## 打开文件

<div class="guide-steps">

<div class="guide-step">


### 打开主题

在 **Home** 的 **Store data** 卡片中，选择 **Themes**，然后选择该主题。请参阅[主题](/backup-and-restore-tipo/browse-and-compare/browse/themes)。

</div>

<div class="guide-step">


### 选择文件

在 **Theme files** 列表中，如有需要可先搜索或排序，然后选择文件名。文件页面随即打开。显示主题名称的面包屑可带您返回该主题。

</div>

<div class="guide-step">


### 选择备份版本

使用右侧的 **Backup version** 菜单选择要对比的备份。默认选中最新的备份。

</div>

</div>

## 查看对比结果

**Content comparison** 部分会并排显示 **Live store** 文件和 **Backup** 文件。

### 文本和代码文件

您会看到逐行对比。在宽屏上，两个版本并排显示；在窄屏上，则以单列显示。不超过 300 行的文件会完整显示。更长的文件则显示发生变化的行及其周围少量上下文。

如果两个文件相同，您会看到 **No differences between the live file and this backup.** 以及文件内容。

### 图片

每一侧都会显示带有 **File name**、**File type**、**Size** 和 **Backed up** 的预览，以及一个 **Download** 链接。

### 其他文件类型

有些文件无法预览。您会看到 **No preview available for this file type** 或 **This file type isn't compared. Open it to view the file.**，并带有 **Open file** 链接。如果内容缺失，您会看到 **Content is unavailable for this file or backup version.**

## 恢复单个文件

选择文件页面顶部的 **Restore**，即可从所选版本恢复该单个文件。文件会被写入其所属主题。单个文件没有目标位置或安全备份选项。如需恢复到主题的副本中，或先进行安全备份，请改用主题页面。请参阅[恢复单个项目](/backup-and-restore-tipo/restore/restore/restore-a-single-item)和[恢复主题](/backup-and-restore-tipo/restore/restore/restore-a-theme)。

## 如果出现问题

如果您看到 **Couldn't load theme files**，请选择 **Try again**。如果某个文件无法加载，请选择其他备份版本。

## 后续步骤

* [对比主题翻译](/backup-and-restore-tipo/browse-and-compare/browse/themes/compare-theme-translations)
* [恢复主题](/backup-and-restore-tipo/restore/restore/restore-a-theme)
* [下载主题](/backup-and-restore-tipo/backups/backups/download/download-a-theme)
