The cloud has deleted my media data, can you help me to see why?

My account is “lianlengxue@qq.com”, I would like to have an engineer check the logs to help me determine when the cloud deleted my media files, this loss is causing me a lot of panic and anxiety. Shouldn’t it be more obvious when a resource is deleted in the cloud?

Here’s how I ran into the problem today:
1, Today I reset my MacOS system (APPLE M1 PRO) using Time Machine
2, then logged in to anki and synced, then it said some media files could not be found.
3, I’m sure it was fine yesterday
4, after spending hours trying to fix it, I went to ankimobile (IOS), logged out of my account and logged back in.
5, at this point it says that I have 3407 cards in the trash (exactly the number of cards I lost in the cloud)
6, I choose reply all and sync, upload
7, Now I download again on MacOS, all the media files are back

Some background info: Sound/image media files have gone missing! - Frequently Asked Questions

If the Time Machine restore did not restore all your files, it will have appeared to Anki that you deleted the files, and it will then delete the files on your other devices when you sync them.

The cloud always deletes my local media files frequently, is there some optimization that can be done in this area? Why do they have to be deleted in the cloud when they are obviously being used?

For the last three days, whenever I change the device to sync, it will prompt me that the media file does not exist, I need to do an operation to recover deleted files and sync on my iphone …

Do you manually add these media in the media directory, or do you add them through Anki?

When you sync, Anki checks to see if any media files in the media folder have been removed, or are empty. If any files were removed, the sync tells AnkiWeb, and when your other clients sync, they will also delete the files. If you restore the files from the trash folder, they should be sent to AnkiWeb, and will sync to the other clients again. They should not disappear unless something deletes the files again. If you find the problem keeps happening, I suggest you keep an eye on your media folder on the computer version to see when the files are being removed.

through Anki.

I wish ankiweb would do something to optimize the steps for deleting media files, I think the current steps for deleting media files from the cloud are flawed and should be confirmed before deleting them.

With your answers, I have probably understood why they disappeared. When I recovered my system through MacBook Time Machine, the media files were not recovered by Time Machine.

At this point I did a sync expecting to download the media resources from the cloud, but instead of doing what I expected, it deleted the media resources from the cloud by detecting that the local media resources were empty …

All, is it possible that this optimization will happen in the future? Thank you very much!

I do not think a confirmation is appropriate here. Partially restoring from a backup is not something many users are going to hit, and Anki did not delete the files on your other devices, it placed them in its trash folder, allowing you to recover them.

Also, you have to understand that this situation was caused more by your misunderstanding of Anki rather than Anki’s own behavior. I don’t say it’s your fault (after all, I don’t need to know how a car actually works in its every single detail in order to drive it), but the solution is probably to make users understand how Anki works rather than changing Anki. This is why we usually strongly recommend reading the manual… See RTFM.

I’ve also been a veteran developer for over a decade. For whatever reason, when I’m syncing on a new device, it’s weird to delete media files that are still in use directly from the cloud.

  1. I use the sync function, without any prompt
  2. I use the media check function, and it tells me that I am missing more than 3000 media files…

I think, before deleting, we should check if the media files are still in use,
If they are still in use, would it be better to sync them locally from the cloud instead of deleting them directly from the cloud? Or at least give users the right to choose for themselves?

I’m a little unhappy with your straightforward prevarication, but of course I’m not really in a position to accuse anything, even though I’m a paid IOS user and it has helped me a lot over the years, anyway, thanks for the reply, good luck.

Translated with DeepL Translate: The world's most accurate translator (free version)

Directing users to the appropriate part of the manual is fine and helpful, but please avoid terms like that.

That would reduce the chances of users making mistakes when manually modifying Anki’s files, but it’s not practical: scanning the content of all notes is an expensive operation, and would not be able to happen in the background.

1 Like