If you go to the menu File -> Switch Profile
and hit the Open Backup
button, can you find an earlier backup of your collection? Restoring an Automatic Backup (Recovering from Data Loss)
If you have your cards on iPhone, you can sync them with Ankiweb by selecting sync
and choosing upload (on your iPhone), later on, your computer you can select sync
and choose download
to download your collection from Ankiweb.
In the future, you can try to keep your own backup your collection (your Anki directory on your local computer), see Managing Files and Your Collection. In my computer, I daily run a script that backups the whole Anki directory daily up to the last 100 copies/days.
Related threads:
- https://anki.tenderapp.com/discussions/ankidesktop/41315-how-to-recover-deleted-flashcards
- https://anki.tenderapp.com/discussions/ankidesktop/41464-deleted-cards
- https://anki.tenderapp.com/discussions/ankidesktop/41527-error-solution
- https://anki.tenderapp.com/discussions/ankidesktop/41713-uploaded-old-version-of-decks-to-anki
- https://anki.tenderapp.com/discussions/ankidesktop/41746-lost-front-definition-on-cards
- https://anki.tenderapp.com/discussions/ankidesktop/41957-deleted-profile-on-anki
- https://anki.tenderapp.com/discussions/ankidesktop/41920-deleted-deck