immich-go icon indicating copy to clipboard operation
immich-go copied to clipboard

--overwrite doesn't overwrite existing asset

Open handle9 opened this issue 9 months ago • 8 comments

I'm trying to reupload my google photos takeout to solve some weird errors using the --overwrite command. When I do this the --overwite command doesn't seem to work and I get the following message:

server has same asset file=takeout-20250602T063530Z-1-078:Takeout/Google Photos/Photos from 2022/VID_20221211_164646.mp4 reason=An asset with the same name:"VID_20221211_164646.mp4", date:"2022-12-11 12:46:46" │ │and size:75.7 MB exists on the server. No need to upload.

I used the command below on my unraid server:

./immich-go upload from-google-photos --server=my_url --api-key=1my_api_key --overwrite takeout-*.zip

Am I missing something?

handle9 avatar Jun 02 '25 17:06 handle9

I think the --overwrite option is available only for a raw folder import...

Why to reupload a file that already exists on the server? It will be rejected anyway by immich.

simulot avatar Jun 04 '25 10:06 simulot

I think the --overwrite option is available only for a raw folder import...

Why to reupload a file that already exists on the server? It will be rejected anyway by immich.

The files aren't actually on the server but the database thinks it is. I'm trying to avoid a total rebuild but I guess that's what I'll be doing.

handle9 avatar Jun 05 '25 05:06 handle9

The CLI says that overwrite is a global flag and it will always overwrite

--overwrite                             Always overwrite files on the server with local versions

but this is not happening

lucacome avatar Jun 30 '25 18:06 lucacome

I think the --overwrite option is available only for a raw folder import...

Why to reupload a file that already exists on the server? It will be rejected anyway by immich.

The files aren't actually on the server but the database thinks it is. I'm trying to avoid a total rebuild but I guess that's what I'll be doing.

Exactly this and overwrite flag doesn't overwrite

eenturk avatar Jul 01 '25 20:07 eenturk

run immich-go with --log-level=DEBUG You will get the full list of files available on the server.

simulot avatar Jul 01 '25 21:07 simulot

run immich-go with --log-level=DEBUG You will get the full list of files available on the server.

I fixed it using the Immich CLI with the --skip-hash flag at least it seems like it will ping back when it's completed

Edit: Successfully uploaded 0 new assets (0 B) Skipped 8452 duplicate assets (94.6 GB)

Didn't worked rip

eenturk avatar Jul 01 '25 21:07 eenturk

Would also like to upload some photos which are already existing but --overwrite doesn't work. I've updated the capture date of many fotos because immich didn't get them correct and now want to upload and overwrite them

Doing the changes via the WebGUI would take too much time so i hoped immich-go could help...but till now...nope

Leviathan09 avatar Jul 31 '25 06:07 Leviathan09

I've downloaded and edited existing photos from Immich and like to re-upload replacing the photos but the overwrite option does not work as I'd hoped. Thank you for the tool but is there any plan to implement overwrite exiting photos?

frankyfranks avatar Sep 03 '25 17:09 frankyfranks