docs-site/manual/backups.mdx
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.
To restore from an automatic backup:
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.
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:
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.
Backups created with 2.1.50 will not be importable into older Anki versions.
You can restore from a manual backup by using File>Import.
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:
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.
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".
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. Historically, Anki only supported a single note type
at one time. So, if you had deleted notes from different note types,
you needed to split the file into separate files for each note type
first.
However, profiles created in Anki versions newer than 25.09.2 have the
following snippet at the top of deleted.txt (hence allowing you to
import deleted.txt without the need to split the file):
#guid column:1
#notetype column:2