Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Library - Delete Library, also deletes all files on the storage #9460

Closed
2 of 3 tasks
monarc83 opened this issue May 14, 2024 · 5 comments · Fixed by #9496
Closed
2 of 3 tasks

External Library - Delete Library, also deletes all files on the storage #9460

monarc83 opened this issue May 14, 2024 · 5 comments · Fixed by #9496

Comments

@monarc83
Copy link

The bug

If you delete an external library, not only the assets in Immich will be deleted but also all assets from /import on your storage, even if the confirmation says otherwise.

"Are you sure you want to delete this library? This will delete all 90 contained assets from Immich and cannot be undone. Files will remain on disk."

if something is missing and the problem cannot be reproduced, please let me know what else is needed.

The OS that Immich Server is running on

Unraid 6.10.12

Version of Immich Server

v1.104.0

Version of Immich Mobile App

1.103.1 build.137

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

.

Your .env content

.

Reproduction steps

1. Delete Library from Web app
2. Confirm deletion

Relevant log output

No response

Additional information

No response

@ThreeAurora
Copy link

ThreeAurora commented May 14, 2024

There is a major update to the external library now, which is already editable.

@monarc83
Copy link
Author

monarc83 commented May 14, 2024

Yes, that's exactly the problem. External libraries are now editable, we have all been waiting for that, but if you have to delete your library for some reason and it is :rw mounted, all photos are also deleted from the storage, not just removed from Immich. Even though Immich shows the following deletion confirmation.

"Are you sure you want to delete this library? This will delete all 90 contained assets from Immich and cannot be undone. Files will remain on disk."

@guidovw
Copy link

guidovw commented May 14, 2024

Happened to me today, immich wouldn't read the data in the external library, so I decided to delete it, and it erased all my pictures (11,000). I'm hoping to recover them. This needs an urgent fix!

@gitneko
Copy link

gitneko commented May 14, 2024

The PR removed the if clause that should've been moved down (in a modified manner) and prevent deleting the files on library deletion. But in its current state it will delete all files (as reported), this should never happen. External library assets should be editable, but should never remove files once the external library gets removed from Immich. Please fix this urgently.

@alextran1502
Copy link
Contributor

We are looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants