Backups

自动备份

Automatic backups

Anki 将为你的卡片数据创建自动备份。其中包括卡片上的文字和学习进度信息,但不包括音频或图像文件。

Anki will create automatic backups of your card data. These include the text on your cards and your scheduling information, but do not include sounds or image files.

自动备份对于从错误中恢复可能很有用,但不应仅依赖它们。因为它们存储在你的本地设备上,所以如果你的设备损坏或被盗,它们将无法保护你。我们建议你将它们与手动备份结合使用。

Automatic backups can be useful to recover from mistakes, but you should not rely solely on them. Because they are stored on your local device, they will not protect you if your device breaks or is stolen. We recommend you combine them with manual backups.

恢复

Restoring

从自动备份中恢复:

To restore from an automatic backup:

  • 打开 Anki,然后从“文件”菜单中选择“切换账户”。

    Open Anki, and choose Switch Profile from the File menu.

  • 点击“打开备份”按钮。

    Click on the "Open Backup" button.

  • 选择你想恢复的文件。

    Select the backup you wish to restore from.

从备份还原时,自创建备份以来所做的任何更改都将丢失。

When restoring from a backup, any changes made since the backup was created will be lost.

当你从备份中恢复时,Anki 会禁用自动同步和备份。一旦你对恢复了正确的备份感到满意,请关闭并重新打开 Anki 以恢复正常。

Anki disables automatic syncing and backups when you restore from a backup. Once you're happy that you've restored the correct backup, close and re-open Anki to return to normal.

Anki 2.1.50+

备份是定期创建的。你可以在首选项屏幕中配置备份间隔时间。默认值为 30 分钟。

Backups are created periodically. You can configure the time between backups in the preferences screen. The default is 30 minutes.

某些操作将触发备份,即使配置的时间尚未达到:

Certain operations will trigger a backup, even if the configured time has not elapsed yet:

  • 单向同步下载

    A one-way sync download

  • 使用“文件”>“导入”导入 .colpkg 文件

    Importing a .colpkg file using File>Import

  • “工具”->“检查数据库”

    Tools>Check Database

备份完成两天后,Anki 将开始删除一些较旧的备份。你可以控制要保留的每日、每周和每月备份的数量。

After backups are two days old, Anki will start removing some of the older ones. You can control how many daily, weekly and monthly backups you'd like to keep.

使用 2.1.50 创建的备份将不可导入旧的 Anki 版本。

Backups created with 2.1.50 will not be importable into older Anki versions.

Anki 老版本

Older Anki versions

每次关闭集合(关闭 Anki、切换账户或进行完全同步下载时),Anki 都会创建一个备份。默认情况下,它将存储多达 30 个备份;你可以在首选项中对此进行调整。

Each time your collection is closed (when closing Anki, switching profiles, or doing a full sync download), Anki creates a backup. By default it will store up to 30 backups; you can adjust this in the preferences.

手动备份

Manual colpkg backups

恢复

Restoring

你可以使用“文件”>“导入”从手动备份中恢复。

You can restore from a manual backup by using File>Import.

创建备份

Creating

在 Anki 2.1.50+中,你可以使用“文件”>“创建备份”来触发即时备份。此功能类似于常规自动备份,不包括媒体文件。

In Anki 2.1.50+, you can use File>Create Backup to trigger an immediate backup. This functions like regular automatic backups, and does not include media files.

要创建包含音频和图像的备份,请执行以下操作:

To create a backup that includes your sounds and images:

  • 从“文件”菜单选择“导出”

    Select Export from the File menu.

  • 确保选择了“Anki 集合文件(.colpkg)”。

    Ensure "Anki collection package (.colpkg)" is selected.

  • 勾选“包含媒体”选项

    Enable the "include media" option.

这将创建一个 .colpkg 文件,其中包含你的所有卡以及它们使用的任何声音/图像。我们建议你将文件存储在安全的地方,如其他设备,或基于云的文件存储服务,如 Dropbox 或 Google Drive。

This will create a .colpkg file that contains all of your cards and any sounds/images they use. We recommend you store the file somewhere safe, like a different device, or a cloud-based file storage service like Dropbox or Google Drive.

AnkiWeb

将你的集合与 AnkiWeb 同步可以为你的设备丢失或被盗提供一定程度的保护。如果你需要从 AnkiWeb 恢复你的集合,你可以在首选项屏幕中强制进行单向同步,或者从新设备进行同步,然后选择“下载”。

Synchronising your collection with AnkiWeb provides some level of protection against your device being lost or stolen. If you need to restore your collection from AnkiWeb, you can force a one-way sync in the preferences screen, or sync from a new device, and then choose "Download".

删除日志

Deletion log

Anki 将删除的笔记记录到你个人资料文件夹中名为 deleted.txt 的文本文件中。这些笔记采用文本格式,可以通过“文件”>“导入”读取,但请注意,导入功能一次只支持单个笔记模板,因此,如果你删除了不同笔记模板的笔记,则需要先将文件拆分为每个笔记模板的独立文件。

Anki logs deleted notes to a text file called deleted.txt in your profile folder. These notes are in a text format that can be read by File>Import, though please note the import feature only supports a single note type at one time, so if you have deleted notes from different note types, you'll need to split the file into separate files for each note type first.