Yes, Anki does automatic backups you can recover from
Anki Mobile Backup Restoration
The mobile client does automatic backups of collections in the background, which you can restore by going to Preferences → Backups and select the backup you want to use.
AnkiMobile will automatically create backups of your collection for you. The backups include all your cards and statistics, but do not include sounds or images, since they take up a lot of space.
The backup is taken in the background when you return to your device’s home screen, or switch to another app. A backup will only happen if more than an hour has elapsed since the last time a backup was created. AnkiMobile will store the last 15 backups.
To restore from a backup, open the Backups section in the preferences, and tap on the backup you wish to restore to.
From the Anki manual, in the 'Backups' section.
Anki Desktop
In my Anki directory, I have a backups entry with backups present:

(backup listing, not all entries shown)
So check in ~/.local/share/Anki/<profilename>/backups.