URGENT: Massive Anki media loss right before STEP 2 — need help recovering images

Hi everyone — I’m taking USMLE Step 2 in <10 days and suddenly a huge number of my Anki images are missing. I’ve already spent 20+ hours trying to fix this and would really appreciate any help.


Background

  • I originally downloaded the AnKing deck via AnkiHub over a year ago.

  • Shortly after, I cancelled my AnkiHub subscription (no updates since).

  • Since then, I’ve heavily edited thousands of cards — especially images.

  • My deck is now highly customized and not easily replaceable.


What happened

  • My Anki collection is stored in a OneDrive-synced folder.

  • Recently, OneDrive began processing/syncing heavily (not something I manually triggered).

  • Around this time, I started noticing images missing across many cards.

  • Today, I set up Anki on a new laptop and logged into AnkiWeb:

    • I chose “Download from AnkiWeb” (overwrite local profile)

    • The issue persisted → suggests AnkiWeb already had missing media, and this step likely propagated the issue to the new device

  • Troubleshooting steps I’ve tried:

    • Ran Check Media → THOUSANDS of missing files (all referenced by cards)

    • Performed multiple forced syncs (upload + download) → no improvement

    • Disabled all add-ons → no change

    • Searched prop:cdn:cf=11 → cards are present but images are blank

    • Checked cards in editor + HTML view → image references exist, but files are missing

  • Backups:

    • Found collection-2026-04-24.zip → unsure how to safely use it

    • Backups within the Anki app itself → importing those does not bring back the media

    • On my computer under App Data > Roaming > Anki2 > name of my Anki profile > backups, there are 35 backups in the format “backup - insert-date-here.colpkg” 12 of which are from the last 10 days → importing those brings back no media meaning there are ZERO images in my Anki (compared to right now where downloading from AnkiWeb yielded a lot but not all of my images)

    • I last exported from Anki onto my Onedrive “collection - insert-date-here.colpkg” in 2025


Current situation

  • Cards themselves are intact (text, structure, flags, edits)

  • But a massive portion of media is missing

  • Many images were custom-edited, not just original AnKing media

Browse:

Tools > Check Media:

“View Files”:

This folder contatins 296,112 items!


Main questions

  • Is there any way to recover missing media in this situation?

  • Could OneDrive syncing have caused mass deletion/desync of the media folder?

  • Is there any way to re-pull only media from AnkiHub without overwriting my edits?

  • Can collection-2026-04-24.zip be used to restore media only?


I’m trying to avoid losing a year+ of detailed edits right before my exam. Any guidance would be hugely appreciated.

Thank you :folded_hands:

The first thing I will tell you is that I’m looking at the AnkiWeb account attached to the email address you used to post here, and there have been no media files deleted from it recently. This suggests to me that whatever the issue is, the media hasn’t gone anywhere. So take a deep breath, and we’re going to figure this out.

In that new profile on another laptop, it would take a considerable amount of time, and possibly several tries to download your entire collection.media, since it is currently over 19 GB on the server.

Are you sure that the media sync completed [see Syncing with AnkiWeb - Anki Manual and the short video about media syncing]? If it did – the Check Media results on that system should match the Check Media results on your regular computer – the number of files in the collection.media folder should match as well. Have you checked that?

From the manual/video you also learned that media sync is separate from your main collection, so forcing a one-way sync doesn’t do anything different with media. As suggested there, you can try to log out/in to force a rescan of media. If there is anything on the server that you don’t have locally, that will fetch it again for you.

Your collection.media folder has 296K files, but Anki is recognizing 196K of those files as “Unused” – which might be more interesting than the 34K “Missing.” I suspect it’s been a long while since you’ve ran a media check, and tended to your media (probably how your collection has grown to 19 GB too). That means it’s very hard to say how many of those “Missing” files are actually the ones you’re concerned about (as opposed to media references in decks you’re not using).

At the bottom of that window, have you clicked the “Tag Missing” button? That will tag the notes Anki thinks are missing media, so searching tag:missing-media deck:... – with the name of your primary deck(s) – will help narrow down the scope of the problem.

Maybe. OneDrive could make whatever decisions it wants about the data (and the amount of data) you’re allowed to store there. If you’re using a free account, they probably won’t store 19 GB of media for you.

But if OneDrive started deleting files, they would be in OneDrive’s trash for a time – have you checked there? OneDrive also keeps a log of its actions – has it actually been deleting files, or has it been doing something else?

[It’s recommended that you don’t use a 3rd-party syncing service with your Anki2 folder because it won’t necessarily leave your collection alone when Anki is using it. But that is more likely to cause issues with your collection database than media.]

Probably. But rather than taking any chances with what notes and fields you’d need to protect to do that, the easiest thing to do would be similar to what you did above – create a new Profile (on your regular computer or that other computer), and set that up to download the deck from AnkiHub.

That Profile will have a clean copy of the deck, with it’s own separate collection.media folder. You can copy any missing files from there to your own collection. But since you’ve been editing the media (and AnkiHub likely has too), be cautious not to overwrite any files with the same name – regardless of date.

I don’t know what that is. It’s similar to the naming convention Anki uses when you export a COLPKG [collection-date@time.colpkg], but it’s missing the time, and it’s got the wrong extension. Changing the extension to zip is a common suggestion for viewing the contents of a COLPKG/APKG externally. Is it possible you made a collection export a few days ago and changed the extension, or wrapped it in a separate zip file?

That’s normal. Automatic backups don’t include media.


Another Suggestion

Other than the things I’ve suggested above (which I’ve marked), sudden “loss” of media files can be caused by something as simple as accidentally changing the references to media files inside Anki (like with a too broad Find-and-Replace, if that rings any bells?) or changing the name of the files outside Anki (like by a file-system poorly dealing with a naming convention).

In both of these situations, it could look like what you’re seeing – media doesn’t show up in Anki, but nothing has actually been deleted from AnkiWeb, since the files have at most been renamed. [This could also match with your OneDrive cranking up, since it would need to rename all of those files.]

You might also see similar filenames in both the “Missing” and “Unused” media lists. Yours unfortunately run to the tens and hundreds of thousands, so it’s not something you can compare at a glance. I’m hoping once you tag your notes that are missing media, you’ll have a more approachable list of filenames and you can do some spot-checking against the missing/unused lists and against the files actually in your collection.media folder.

  • [Click < > above the field in Anki to open the HTML view and see exactly what file it is referencing.]
  • Check to make sure the file isn’t actually present in your collection.media, since Anki would display a corrupted file and a not-found file similarly.
  • Look for substitutions of spaces or %20 or - or _ – or for anything with % or parentheses, which might indicate truncation or file duplication.

Thank you SO MUCH for your message!!!

Before I try to work through your ideas (I am a medical student so all this tech talk is hard for me), I just want to make sure that what you wrote will still apply to my situation after I tell you this:

I have 3 Anki profiles under 3 different email addresses. The Anki profile that I am missing media files from is the profile associated with the email address danc*. By contrast, the Anki profile associated with the email address I used to post here is a different profile that I pretty much have not used in over a year.

Please let me know if your message is still applicable. I basically want to know if I should still be hopeful that I did not delete my media files.

I did just reread your message again and tried parts of it:

I can confirm that a couple times, based on the advice of Gemini and ChatGPT, I clicked Preferences in Anki, unchecked the log in box so that it would log me out, synced, closed Anki, and then relogged in (I think that’s what I did).

I just watched the video you sent about media syncing.

You suggested that under Tools > Check Media, I should click “Tag Missing.” I just did that and it came out to 47,432 cards. Some of them are indeed missing media (see first pic), but some of them as far as I can tell have all their media intact and yet are still being tagged as missing media (see second pic).

I have a paid subscription to Onedrive, so storing large amounts of data should not be a problem.

I just logged into Onedrive online and the recycling bin does not show anything related to Anki.

You are correct. At one point, Gemini advised me to convert the .colpkg into a zip and then extract the files from the zip.

I don’t think I understand what you wrote about the HTML view looking at the Anki cards tagged missing compared to the media files in my folder called collection.media. One thing I can say is that when I do look at the HTML view, the names of the cards often do include “%20,” “-,” and “_.” I’m sorry I don’t really understand computers (as you can see)… I am going to show some screenshots and hopefully something will be useful?

Yes, that changes pretty much everything. [The account I checked earlier has been recently active, so there wasn’t any indication I should inquire further.]

You can remove that danc* email address from your message if you want. But before I can take any action with this account, you need to add it to your profile here (in this forum) as a secondary/alternate address and verify it, so I know it belongs to you.


Starting over from the beginning –

Yes, there has been quite a bit of media deleted from that account recently. My test-counter only runs to 4 digits, so it’s over 10K files. Yes, that includes some of the filenames in your screenshots of notes and your media check.

I can start restoring the recently deleted files, but this is going to take some time to restore and for you to resync. Please confirm if you want me to restore the media deleted from this danc* AnkiWeb account (after adding that email address here, as I said above). I’ll start with the media deleted in the past 2 days, and let you know when that is done. You need to avoid syncing with AnkiWeb while the restore is happening.


Once your media is restored, there are 2 more things you will need to do –

  1. Looking at your accounts, I am astounded to see that on top of the 19 GB of media you’re storing on AnkiWeb for the account I looked at earlier, you’re using another 75+ GB of space for media in these other accounts. I urge you consider whether you’re making responsible use of this free, shared resource. So, when this is done (you can’t do it now, or it will mess up the restoration), you need to use the built-in Anki process to “Delete Unused Media” in all 3 of your AnkiWeb accounts.

  2. It sounds like OneDrive didn’t delete your files, so it’s pretty important that you figure out how to stop your files from being deleted from your computer. They weren’t automatically deleted from inside Anki or as part of the syncing process, so if you’ve got some sort of drive-cleaner utility running on your system, you need to keep it away from files that are important to you.


Other details that still may be useful –

That difference between the first and second pic is what I was talking about when I said, “it’s very hard to say how many of those “Missing” files are actually the ones you’re concerned about.” Files can be “Missing” that you don’t care about. So once this media is restored, your media check might still show missing files. (The number of “cards” doesn’t matter here – because the files are attached in the fields of the “notes.”)

You shouldn’t to do this step anymore because it will just slow things down – but that doesn’t sound quite right. “Log Out” is a button. After you clicked that, if you tried to sync, you would need to log in again right then (not after you “synced, closed Anki”), so your sequence of steps doesn’t look right. Are you mixing up Preferences > Syncing with something else?

Thank you so very much for your message and I apologize for making such a messy situation. As is quite clear at this point, I do not understand Anki/computers… :frowning:

I have added the desired email address to my account and confirmed it - done.

Yes, I confirm that I want you to restore the media deleted from this danc* AnkiWeb account - as long as that means that images will reappear in my Anki Browse window where icons of images currently are, and this will not change anything else about my Anki.

In order to avoid syncing while you do the media restore, do I have to close Anki on my computer? I was using Anki today to study (I did not edit anything on purpose, but I did search for specific cards and read them). If I need to not use Anki at all on my laptop, please let me know when that period of time will start and end.

I don’t understand, but apparently I did something not good with respect to the GB of media I have. I am happy to Delete Unused Media from all 3 accounts once this is sorted out, as long as that means when I click Browse in Anki, the images I see now will not disappear. Is that correct?

I do not know if I have some sort of drive-cleaner utility running on my system, but I’m guessing that I do not because I had my old laptop without any problems with Anki for 3 years, and I am now on a brand new laptop. As for how the files got deleted, I have no idea… I do know that at one point Gemini told me to delete 175,508 files from one place in my file explorer and then had me copy 175,508 (or 175,504 - I forget) files into the place I had just deleted files from. I don’t know…I just don’t know. Now that I know about the AnkiWeb forum, if I ever run into trouble again, I will CERTAINLY reach out for help here instead of trying to fix it myself with AI. I have very much learned my lesson.

Unfortunately I do not know what I previously did regarding the Log Out button. I am sorry, I just don’t know.

When I first asked my question, I did not share the whole story of what happened because I didn’t know which details are relevant (I still don’t) and it’s a really long story. At this point, I don’t want to take any chances, so I am going to write out in detail what happened as I bet you some of it is relevant:

On Thursday night around 9:30pm EST, I did what I do at the end of every night: I clicked Tools > Preferences > Syncing > On next sync, force changes in one direction > Sync > Upload to AnkiWeb.

This whole saga then started on Friday April 24 in the morning when I downloaded a Sketchy Microbiology Anki deck from Reddit. That afternoon around 2pm, I noticed that the imported Anki deck had written over my cards - I was now missing entire cards from my profile. Google told me that deleting the deck I had downloaded that day would not undo the mistake, so I decided to stop my work, write down on a Word document every change I had made in Anki that day, and then clicked File > Switch Profile > Backups > chose the backup from Thursday night around 9:30pm, and said yes I want that backup to overwrite my entire profile.

After I did that, Gemini scared me by insisting that the media may not have been imported via the Backup restoration, and so I should check this by clicking Tools > Check Media, which showed this:

Missing files: 7830

Unused files: 46749

The following files are referenced by cards, but were not found in the media folder:

I clicked Browse and I did not see any of my media missing, but I obviously did not look at the million cards in Anki and so it’s very possible (I’d imagine likely) that a lot of media was indeed missing. I then followed Gemini’s instructions for how to fix this problem (I copy and pasted my conversation with Gemini onto a Word document - please let me know if you need to see it so you know what it had me do). Nothing it suggested worked, and so I kept asking it follow-up questions, and it assured me that all I had to do was just 1 more thing and for sure that would fix it. It had me copying and pasting data that took my computer 2 hours just to transfer. 5 hours later after all its ideas that I attempted, I decided to click Browse and was horrified to see that at some point between 2pm and 7pm, ALL the pictures in the entire Anki profile were missing and had been replaced by the images icon.

At around 7:30pm, I stopped writing to Gemini and decided to repeat what I did at around 2pm: File > Switch Profile > Backups > chose the backup from Thursday night around 9:30pm, and said yes I want that backup to overwrite my entire profile. I thought this would make all my pictures visible again - except the 7830 missing files, but I thought oh well, I give up, I don’t know what else to do at this point. This step seemingly helped nothing - I still had NO pictures at all.

On Saturday night at 9:30pm, I accidentally closed the Anki app on my computer. When I reopened it, it asked me to choose “Upload to AnkiWeb or Download from AnkiWeb.” I waited to ask a friend and then at 11pm I clicked “Download from AnkiWeb.” I stayed up till 1am and in that time it still did not finish “Syncing” - there was a gray spinning wheel next to the word Sync that whole time. I plugged in my laptop and set it to not go to sleep for 5 hours to ensure that the Sync would not get interrupted while I went to sleep.

Sunday morning I woke up to an error message in my Anki: “Connection timed out. Please try again. If you see frequent timeouts, please try a different network connection.” I clicked Browse, saw that all the pictures in Anki were still missing, and clicked Sync which started the spinning grey wheel endlessly all over again. I then suddenly noticed this in the bottom-right corner of my screen, which confused me because I thought I was Syncing Anki, not Onedrive.

I uploaded my transcript with Gemini to ChatGPT and I don’t recall what I did next, but I think it told me to create a “Recovery test profile” and told me look for the media files in certain places, which all showed up empty - I just know that I sent my friend these pictures:

Around the same time, clicking Tools > Check Media yielded this:

Missing Files: 136548

Unusued Files: 0

The following files are referenced by cards, but were not found in the media folder:

Around 11:45am, someone suggested I check AnkiWeb and also that I try using the Anki app on a family member’s computer. I said that it would not help because I was pretty sure that I had already at some point (on Friday, Saturday night, or Sunday) clicked Tools > Preferences > Syncing > On next sync, force changes in one direction > Sync > Upload to AnkiWeb. Nonetheless, I did check AnkiWeb and was shocked to find that A LOT of my pictures were still in AnkiWeb! Not all of them, but a lot of them. Since my laptop was having problems for the last month or two and I had just bought a brand new laptop.

I decided to set up the new laptop, download the Anki app onto it, and log into my danc* account. When it said “Local collection has no cards. Download from AnkiWeb?” I clicked “Yes,” and it started syncing for a long time.

I then stepped away from the laptop for < 5 mins but because it’s a new laptop, it has the settings that it came with out of the box which include the computer going to sleep after just 3 minutes of inactivity, so it went to sleep. I then logged back into my laptop and found that Anki had given me an error message saying there was a network error and it lost connection. So I clicked Sync again and then changed the settings temporarily so that the laptop when plugged in never goes to sleep and Anki did its thing “Syncing.” While it was still in middle of the sync, I clicked Browse and was delighted to see that a lot of my pictures were back! Since the sync was not done, I did not worry that a bunch of pictures were still missing. Around 30 minutes later, out of nowhere, I got another error message in Anki: “A network error occurred. Error details: error sending request for url ().”

I think I then hit Sync one more time, but I’m not sure. What I do know is that 40 minutes after the network error occurred, I tried X’ing out my Anki and instead of closing, it showed this:

I did not click Abort or Close. I let it do its thing for a super long time until it eventually finished.

I do not recall doing anything else after that - I think the sync finally finished and the end result is what I have right now: A lot of pictures are in my Anki, and a lot of pictures are still missing.

I then installed 8 add-ons to my Anki - the 8 that I had on Anki on my old laptop. I then manually added back all my custom colour flags because for some reason those did not transfer over. The data did, meaning when I clicked Browse > prop:cdn:cf=7, Anki still pulled up the correct 173 cards in that flagged deck, but when I’d right-click those cards, no flag would be shown, and the cards had no colour. This matter is now resolved.

P.S. Throughout the last few days, I copy and pasted a bunch of stuff onto an external SSD so that I’d have a backup of things in case I accidentally made anything worse. Here is a screenshot of what I backed up:

P.S.S. While writing you this message, I clicked File > Switch Profile just to see what buttons were then available to click (I did not click any of them) so that I could write this message to you correctly. When I did that, it started Syncing! I did not ask it to Sync! But it did briefly and then it finished. What I just noticed though is that my Onedrive is now syncing too - it looks completely identical to how it looks in the screenshot above. The only difference is that it’s not telling me how many GB it is syncing - it just says “Processing changes.”

Yes, it just restores the deleted files on the server side, so you can download them again when you sync. It’s like restoring something out of your Windows “Recycle Bin” that you accidentally deleted.

No, you don’t need to close Anki. But I don’t know exactly how long this will take, because I don’t know how many files it will be yet.

If you have Anki open now, go ahead and Sync. Then go to Preferences > Syncing – uncheck “Automatically sync on profile open/close” – and save. [You will want to turn this back on when we’re done, so write yourself a big reminder note.] Now the only way to sync will be clicking Sync – so just don’t do that. Tell me when you’re done with that, and I’ll tell you that I’m starting the restore.

[I haven’t finished reading your message yet, but I want to get this restore started, so if there’s anything else that needs a response, I’ll follow-up later with that. ]

Awesome, thank you!

Preferences > Syncing – I have unchecked “Automatically sync on profile open/close.”

“Periodically sync media” is still checked though. If you want me to uncheck it, let me know. Otherwise, all done - I am ready for you to start the restore :slight_smile:

Go ahead and uncheck that too (but add it to you reminder to turn it back on!), just in case. I’m starting the restore right now. I’ll update you when it’s done.

Done!
THANK YOU!!! :heart:

Okay, that restored 30835 files, approximately 3 GB of additional media. Reenable syncing and sync until the media sync completes. Then you can run Check Media again.

Tysm! I re-checked both boxes and clicked Sync. It synced in 1 second flat. I clicked Tools > Check Media and it shows the exact same numbers as yesterday morning:

Try going to Preferences > Syncing – click “Log Out” and Save. Then click Sync and log in again.

Because I have been using Anki all morning and was editing it as part of my studying, I clicked Sync once with the intention of following your instruction after. (You already gave me permission to click Sync once earlier today so I figured that would be fine.) This time Sync took a long time. I just clicked Check Media and it now says:

Missing files: ⁨7828⁩

Unused files: ⁨198192⁩

The following files are referenced by cards, but were not found in the media folder:

I think that’s a good sign!

Should I still go to Preferences > Syncing – click “Log Out” and Save and then click Sync and log in again? If so, doing that will not cause me to lose any of the changes I made this morning, right?

I just tried clicking Tools > Check Media and I accidentally clicked Tools > Check Database. I don’t know what that button does, but now that it finished checking the database, the Sync button turned red. I know that means that if I were to click it, it would ask me to Upload to AnkiWeb or Download from AnkiWeb. I am NOT going to click sync at all until I hear back from you.

That’s quite an improvement. In Browse, you can delete the current missing-media tag, and then have that applied anew through Check Media. Then you can see if you care about any of those notes. (Hopefully you don’t, because there isn’t any more media to restore.)

No, you don’t need to (but if you did, you wouldn’t lose any of the changes you made).

Since you only study on this device, you’re safe to upload changes. Remember that one-way sync doesn’t affect media. But also, you already got your media back.

I just clicked Sync > Upload to Anki Web. I then removed the “missing-media” tag, clicked Tools > Check Media > Tag Missing, and then it showed 15,207 cards with missing media. I do not care so much about those cards. Ideally I would have the media back, but if not, that’s okay. I think you said there is no more media to restore meaning there’s no way to get those images back. Okay. That’s okay.

I clicked Tools > Check Media again and it now shows

Missing files: ⁨7828⁩

Unused files: ⁨198192⁩

Questions for a more educated future:

1) Is everything done and good now? Meaning other than the 15,207 cards (or is it 7828 cards?) that have missing pictures, have ALL my pictures been restored? I think so, but I just want to double check.

2) What are the 198,192 “unused files?” If I were to click Tools > Check Media > Delete Unused, what would that do?

3) What caused this whole issue in the first place? I do not understand at all how all my images disappeared. I thought I was being responsible by clicking “Upload to Anki Web” every night before bed, but apparently that was not the correct protocol. I would really like to learn for the future.

4) Going forward, what is the proper way to sync/export a complete backup of my Anki (complete means including all images)? I would like to know that if I ever make a mistake, I always have a backup that includes everything in my Anki (text, images, flags, card due dates, etc). I want to have such a backup every 24 hours so that the worst thing that could ever happen to me is losing 1 day’s worth of work, not a week, month, or year’s worth.

My present understanding is as follows:

  • Every time I hit “Sync” in Anki (and every time that I close Anki because my settings are set to sync every time I do that), it’s the equivalent of hitting “save” on a Word document that I store on my OneDrive. By clicking Sync, if ever my laptop were to die or I needed to download Anki onto a new device, all the changes I made to Anki at the time I clicked Sync would be reflected in Anki wherever I’d access it next. This would include all the images in my Anki cards.
  • If I ever mess up my Anki accidentally, I can click File > Switch Profile > Open Backups. This will bring me to file explorer: C:\Users\danci\AppData\Roaming\Anki2\User 1\backups. This is the hard drive of my computer (not OneDrive). If I were to click one of those backups such that Anki replaces my entire profile with that backup, my Anki would then look identical to how it did at the day & time that that backup was made – except there would be NO images on my Anki cards. Instead, I would merely see icons representing that images had once been there.
  • Something related to Anki automatically gets saved to my OneDrive…something. I am very confused about this.
  • Every once in a while, I can click File > Export. I would then choose Anki collection package (.colpkg) rather than Anki deck package (.apkg). If I then click Export, I would be exporting my entire Anki profile onto OneDrive or an external SSD (wherever I chose to export it to). If I were ever to mess up my Anki accidentally, I could overwrite my entire profile with this .colpkg, and that would look identical to how it did at the day & time that that export was done – INCLUDING images.
  • I never again need to click Tools > Preferences > Sync > On next sync, force changes in one direction > X out Anki > Upload to AnkiWeb. This process does something of course…but whatever it does is not relevant for me?

[Media is attached to a note (in a particular field) – a note can make multiple cards. The number that matters is how many notes have the missing-media tag.]

I can’t tell you if you have back all the media that you want. I can only tell you that your account has back all the media that was deleted recently. If you look at the notes that are still missing media and they aren’t a problem for you, they were probably missing their media long before this. [You might consider removing their pointless media references, so you can get a clean result out of a media check.]

Those are files that aren’t used by any of the notes in your collection. You either deleted the references to those files from your notes (which would look like deleting the image in Browse while you were editing the note), or they are from notes or decks that you’ve deleted from your collection. It’s very normal to have “unused” files hanging around – it’s not normal to have 198K of them.

You definitely need to take care of those [which make up the bulk of the 50+ GB of files in this account, not to mention the dozens of GB in your other accounts, that I talked about above]. Yes, “Delete Unused” is the way to do that – and it’s a very safe 2-step process. The first step moves them to an unsynced media.trash folder – the next time you sync, they will be removed from the AnkiWeb servers. But they will still be accessible to you, and you can hold onto them as long as you want. Once you’re certain you don’t need them, you can “Empty Trash” to delete them from your system.

They were only deleted on AnkiWeb because you deleted them on your computer – as I explained a bit above, at “2 more things you will need to do” #2. It sounds like you did it by following bad advice (“I do know that at one point Gemini told me to delete 175,508 files from one place in my file explorer …”) – so don’t do that. Blindly following instructions of a chatbot is usually a bad idea.

Anki is already backing up everything except media, multiple times a day, so you don’t need to do this. If you want a backup to be stored on a different device, or in cloud storage, for safety, you can copy the latest of those COLPKG files once a day.

Once you clean up the dozens of GBs of unnecessary files, making a backup copy of your collection.media folder periodically should be pretty easy, and that’s all you’d need beyond the automatic COLPKG backup.

I don’t mean to discourage you from maintaining your own backup. It’s sensible idea, especially if you ever stop actively using Anki/AnkiWeb. But don’t go crazy with trying to make backups every second of the day.

Correct – as you saw when you downloaded your collection from AnkiWeb onto a different laptop the other day.

There are several ways to go back after doing something accidentally --
  • If you want to roll-back changes you’ve made just now (and haven’t closed or synced since then) – Edit > Undo [Ctrl Z] the change. [If you select it from the menu, Anki will describe which change it is reversing with each click (useful when you can’t see it happening!).]
  • If you want to roll-back changes made longer ago than that – Option A: Restore from an automatic or manual backup [but you’ll lose any reviews and changes you’ve made since that backup was created].
    • If you just want to grab one thing from a backup (like the text of a template, or one deck out of many, or a set of notes/cards that use a particular note type), you can minimize data loss by importing the backup into a brand new (temporary) profile, find what you’re looking for, copy/export it, and then import it into your main profile.
  • If you want to roll-back changes made longer ago than that – Option B: Force a one-way sync and download from AnkiWeb [but you’ll lose any reviews and changes you’ve made since your last sync].

The 1st part is correct, but the 2nd part isn’t. Your images are stored separately from your collection database (as you’ve seen), so restoring a backed up version of your collection database doesn’t touch your images. They’ll be there exactly as they were when you made the mistake – even if the mistake was “deleting” an image from a field of a note in Browse, because the file is still there, just “unused.”

It may have looked to you like restoring a backup deleted your images, but that’s because you were importing that backup into a separate profile that didn’t have the images your profile had. If you use the restore process in your own profile, the images will still be there.

It’s up to you and your OneDrive what it saves cloud copies of. I can tell you that C:\Users\danci\AppData\Roaming\Anki2\ (aka %APPDATA%\Anki2) is where Anki expects to find your user data for all of the profiles on this computer. I don’t know what you have your OneDrive set up to do, so you’ll have to take that up with Microsoft. [But as I told you above, there are some risks to your collection using a 3rd-party tool to sync your database when you have it open.]

I wouldn’t say “never again.” There can be good reasons to force a one-way sync (for instance to overwrite things you did by accident), but it shouldn’t be part of your everyday syncing habit.

A normal sync compares the collection on your device and the data on AnkiWeb, only syncs things that have changed, and reconciles what it can if both versions have changes. A one-way sync deletes whatever is at the destination and replaces it completely with a full copy of the collection from the source.

I told you I’d also respond if I saw anything of note in the “whole story” of what happened. Most of that I ended up addressing in my last response. But this stands out, because it’s where everything went off the rails –

That is a technically true statement, but it’s wildly misleading (because chatbots are dumb about Anki). The backup restoration didn’t bring your media, but it didn’t need to. Your media was still there … until it got you to start deleting it. Then your next sync took so long because you were syncing that media deletion to AnkiWeb – 30K files, one-by-one.

After the deletion-mess that Gemini made for you – what you should have done instead was log out, click Sync, and log in again. The sync process would have rescanned all of your media and restored anything that was missing on either side. That instruction is right here in the manual

If you have accidentally deleted media files, and want to restore them, open the preferences and log out. The next time you sync, Anki will restore any deleted files, if they are available on AnkiWeb still.

WOW. A lot to digest there.

Thank you for explaining everything to me. I’m going to reread this all later when my brain is fresher so I can make sure to do things properly going forward.

I know that AI can be incredibly stupid (I use it for medical school and have seen it make countless mistakes that I call it out on and then it “apologizes” for saying incorrect things). Because I was so distressed and computers are essentially a language that I do not speak, I felt desperate, freaked out, and listened to it – even though I did not understand what the heck it was saying. That was my mistake, and boy have I learned my lesson. I also did not realize that if I posted a question here, someone would actually answer me and in a timely fashion. I did not realize that this was a viable option. Every medical student I asked for help told me to ask ChatGPT – only 1 person told me about the Anki forum!

I feel much better now that I understand what caused the problem and how to prevent it in the future. An ounce of prevention is worth a pound of cure!

As for the restoration of my images, which are the #1 way I am able to remember anything in medical school: You are a miracle worker!!! You have LITERALLY saved my career. THANK YOU SO MUCH, DANIKA!!! I cannot thank you enough for giving me back hope and literally a year’s worth of work on my Anki. I honestly don’t know what I would have done if you had not restored this for me. I cannot even imagine the consequences. I am so grateful that I can finally get back into the swing of studying and hopefully do amazing on my board exam.

THANK YOU SO SO SO MUCH, DANIKA!!!

I’m glad to hear it worked out. Don’t worry about this anymore now, because you’ve got an exam to finish studying for! When you get through that, you can work on cleaning the unnecessary data out of your accounts.