I would like new images to be uploaded to Immich from my phone and deleted after 30 days automatically, so I was thinking about this flow:
-
I will Sync files to the server using Syncthing
-
I will Copy files from the Synced folder to an Immich Consume folder, (not sure how to copy only new files (maybe use created date)). Then delete images that are older than 30 days which will remove them from my phone.
-
I will upload to Immich using Immich CLI (?) which will use the delete after upload flag.
Basically:
(1)
Camera, Screenshots, etc =Syncthing=> SyncthingImageConsume/{Folder}
(2)
{Script on SyncthingImageConsume}
SyncthingImageConsume/{Folder} =CopyNewFiles=> ImmichConsume/{Folder}
Then delete older than 30 days.
(3)
{Script on ImmichConsume}
Upload to immich and then delete
would this work? and is there a better way to do it? any tips?
Ah, I am not familiar at all with Windows, so I honestly wouldn’t know. Does the Immich CLI even work on Windows?
But going off by the comments and the parts I understand, I guess it could kinda work, assuming that the arguments are all correct. Although, it will try to upload all photos every time, regardless if Immich already has them or not. Which is not ideal but I believe Immich will filter out duplicated photos. But it’s worth checking if it’s indeed smart enough to do that.
For the Immich command it will upload the files to an album called “Camera_Backup”. Not sure if that’s what you want. If not, then remove the -a flag. If you want to upload it to a specific album, then instead add ‘-A albumname’ (edit: I realize I might be wrong here. If you have multiple folders in Syncthing you’re backing up it will work differently)
I will use the argument which makes it delete after upload, this way if it wasn’t deleted then it wasn’t uploaded and needs to be uploaded, hopefully the CLI is smart to do so.
I want it to use the folder name as album name, I was hoping that it would do the same for nested folders
The --delete flag is already in there so it should empty the camera_backup folder, but the robocopy will copy every single photo back into it the next run.
Ah yes that just downed on me today, I need to figure out how to only copy new items