If you've just lost dozens of cards, or even an entire deck in Anki, then this post is for you. There are various ways to bring back your flashcards.

It can happen relatively quickly that you accidentally delete some of your cards. However, restoring these can be even more difficult. If you use Anki on Windows, there are a few ways to save your data.

This tutorial applies to Anki for Windows (https://apps.ankiweb.net/).

Load Your Own Backup

You should regularly back up your cards database. To do this, go to File -> Create Backup.

In the case of data loss, you can now load this backup by going to File -> Import. Then all you have to do is select the backup with the correct date/time.

Keep in mind that the backup overwrites the current database. You will be warned about this in a dialogue. If you are not sure, make a backup of the current database beforehand.

Load an Automatic Backup

Yes, Anki also creates a backup of your data by itself. However, the storage location of the automatic backup is not immediately clear.

The automatic backup is located in the roaming folder, which you can open by pressing Windows key + R. A dialog opens. There you enter %appdata% and press enter. You'll end up in the roaming folder.

The folder named "Anki2" contains your automatic backups and other data. To import a backup, go to your Anki username (e.g. User 1) and finally to the “backups” folder. There you can find the last auto-backups, depending on the set backup interval. You can import these files as usual.

File path:

C:\Users\Username\AppData\Roaming\Anki2\User 1\backups

You can change the interval and the number of automatic backups to be kept in the settings. By default, an automatic backup is created every 30 minutes. Of course, you can shorten this if necessary.

You can also set how many backups Anki should keep until they are replaced by newer backups.

Anki settings for backups.

Importing deleted.txt file

If importing automatic backups doesn't help because the backup is too old, there is another trick to restore deleted cards. The deleted cards are also saved in your user folder as a "deleted.txt" file. This is what the path to it looks like:

C:\Users\Username\AppData\Roaming\Anki2\User 1

This file can also be imported in the regular way via File -> Import. Remember to back up your current database beforehand in case something goes wrong.

Anki Add-On: Undelete deleted note

Anki allows you to use user-created extensions. This GitHub project can also help you get your lost cards back:

https://ankiweb.net/shared/info/912930620

GitHub - Arthur-Milchior/anki-restore-deleted-note: Use deleted.txt content to put back note deleted
Use deleted.txt content to put back note deleted. Contribute to Arthur-Milchior/anki-restore-deleted-note development by creating an account on GitHub.