[Feature]: Support more storage backend #1683
Replies: 28 comments 42 replies
-
Minio would be great ! |
Beta Was this translation helpful? Give feedback.
-
Minio is compatible with S3! |
Beta Was this translation helpful? Give feedback.
-
@gromain : i know :) |
Beta Was this translation helpful? Give feedback.
-
Would this be local storage for thumbnails, and remote storage for files? That would maintain speed for scrolling. Then you would need to pass a Uri to the app to retrieve the full file for viewing? |
Beta Was this translation helpful? Give feedback.
-
If it allows to have a backup also for the media, that would be awesome. |
Beta Was this translation helpful? Give feedback.
-
In my mind it could have been for all objects, but @palitu you're right that thumbnails could still be local. |
Beta Was this translation helpful? Give feedback.
-
In my mind, supporting a well defined platform such as S3-like APIs is a good idea and is something we can look into after the first major release is completed. As for the other idea of having multiple backends that we switch between, in my mind that is the job of the storage layer, not something that immich should natively support. We'll leave this here and probably get around to it at some point in the future! |
Beta Was this translation helpful? Give feedback.
-
Really great to hear your desire for an S3 type backend. FYI, i use the local filesystem for most of immich, then a mounted NFS share for the main photo storage. My server doesnt have the local storage for the bulk data (especially with all the video's), but thumbs is more than appropriate for local. I do think that there are some delays with video playing as a result of this, but i assume in the future it will be improved with this S3 feature. ta |
Beta Was this translation helpful? Give feedback.
-
I just started writing this up as a new feature request before discovering this one. I would love to be able to use S3 storage for all blob objects and make a raw disk volume optional. Big +1 to this feature request! At home I run a Nomad cluster, like a Kubernetes cluster but with less yaml involved. We use CSI-managed iSCSI storage volumes that are mounted directly into running docker images (or other tasks). The preference here is a single writer job and maybe multiple read-only mounts for other volumes. This means that sharing a directory is hard while communicating over the network is easy. Right now the docker-compose files seem to suggest mounting one volume to multiple hosts that all have write access which is a little scary (and hard to do with iSCSI). The performance hit of switching to NFS is very visible on our network. There's an official TS SDK for all the bells and whistles MinIO provides, but I'd strongly suggest looking at just using the S3 SDK which would allow folks to use any S3-compatible storage backend. This is of course asking a lot, adding a new storage backend like S3 is completely different than writing to disk 😄 I'm perfectly happy to be patient for this sort of feature. |
Beta Was this translation helpful? Give feedback.
-
Would like to add that I am interested in S3 storage access as well to offload. |
Beta Was this translation helpful? Give feedback.
-
I try mounting S3 with rclone and found that immich uses softlink which is not allowed in S3. I guess this is one of the things to consider when implement this in the future. Error: ENOSYS: function not implemented, link 'upload/04f8f839-9ee4-47fc-89b1-fb3883cf3008/original/WEB/33809e6c-1f1f-4bec-a8cc-7a0367493e8d.png' -> 'upload/04f8f839-9ee4-47fc-89b1-fb3883cf3008/2022/2022-12-11/hahaha.png' |
Beta Was this translation helpful? Give feedback.
-
Hi, i setup immich on a arm vps on oracle, with ocamel fuse google drive, but I have the same error: immich_server | [Nest] 1 - 03/01/2023, 12:47:57 AM ERROR [StorageService] Error: ENOSYS: function not implemented, link 'upload/85ff3fb7/original/WEB/408963f5-45f7-40e8-960c-79f36116e086.jpeg' -> 'upload/85ff3fb7/2023/2023-02-25/originalName.jpeg' So in the folder 2023-02-25 the image is not present but it's only in the original/WEB/.... |
Beta Was this translation helpful? Give feedback.
-
If I'm reading the source code correctly, the reason Immich currently doesn't support
Now, the problem is, I don't have a thorough understanding of the way Immich is supposed to work here, but if the point is to move the files and nothing more, it seems to me we could achieve full I've created an issue about this here. EDIT: PR here EDIT2: PR is now merged, so all |
Beta Was this translation helpful? Give feedback.
-
webdav plz! |
Beta Was this translation helpful? Give feedback.
-
FYI: I did some tests using rclone and I reported my findings (without a lot of data though) here: #3814. In a nutshell, it did not work reliably enough for me. Maybe we should not consider this feature supported (indirectly via rclone) |
Beta Was this translation helpful? Give feedback.
-
I just installed Immich on k8s and connected it to an s3 compatible storage, all hosted on Vultr. It's bit of a kludge setup and took me four hours to debug. Immich pods - mounted nfs dir -> NFS server pod - mounted s3 dir using s3fs -> s3 The results, well it works. Kinda, if parallelism is reduced to 1 it almost handles uploads of regular photos. There are missed thumbnails here and there and corresponding filesystem errors. Videos are mostly broken, haven't had time to see what exactly is the issue with those apart from ffmpeg errors. Needs more investigation, these are my initial impressions so far. |
Beta Was this translation helpful? Give feedback.
-
I am currently using rclone to mount google drive with seemingly no errors using vfs-cache-mode write. I only mounted the library and upload folder of the docker containers from the rclone folder, having the thumbnails mounted from the server locally.
|
Beta Was this translation helpful? Give feedback.
-
I was thinking about contributing s3 support to immich. I found that
Am I missing some other roadblocks? Would this level of support for s3 even be welcome? |
Beta Was this translation helpful? Give feedback.
-
+! for this to support structured storage for original media while keeping thumbnails and cache data on a local filesystem. This would also benefit from some method to take a database dump and upload it to the same structured storage for future DR scenarios. Currently I use snapshots for the database, but that not going to help in the event of a fire, even though all the original media is currently backed up to an S3 bucket. |
Beta Was this translation helpful? Give feedback.
-
rClone support is great, but I think that native S3 support would be really nice. Serving thumbnails and images with presigned URLs would improve overall performance and scalability. |
Beta Was this translation helpful? Give feedback.
-
I just deployed a test instance of Immich with an S3 backed storage via https://github.com/s3ql/s3ql |
Beta Was this translation helpful? Give feedback.
-
I worked this week to bring up an Immich server backed by S3. I'm using an AWS built and supported tool. Documentation on my setup is here: https://github.com/dubrowin/Immich-backed-by-S3/ |
Beta Was this translation helpful? Give feedback.
-
I currently mount WebDAV with rclone. It works fine most of the time. but there are some problems. native support would surely be great. |
Beta Was this translation helpful? Give feedback.
-
In general, I found the costs of using S3 as the back-end too expensive. It was much cheaper to expand the EBS volume I'm using to a larger volume size (in GP3). |
Beta Was this translation helpful? Give feedback.
-
@gromain is this done / activity working on this? |
Beta Was this translation helpful? Give feedback.
-
Just adding my two cents. I've been playing around building an image/video (assets in general really) management software similar in nature to Immich but currently, specifically for temporary sharing. It purely uses S3 for storing both original copies and generated assets (e.g. thumbnails, transcoded versions). I'll spend more time working on it again later but one thing I'd like to point out is the architecture optimized for S3 versus some filesystem-level or block-level storage looks quite different. From a developer's point of view, for example, uploading images for S3 over others could look different although sure you could just implement a way that is the least common denominator. I'd suggest before any actual implementation work, we should gauge what type of hardware and scale people are actually using Immich for. Personally I love many things that its done for me so far but there's a lot of "cool" or high impact features will still require significant rewrites. (I'm also not a fan of nestjs backend but I digress.) |
Beta Was this translation helpful? Give feedback.
-
Thinking of how this could actually be implemented, should only the originals be uploaded to S3 or should the thumbnails also be stored on S3? |
Beta Was this translation helpful? Give feedback.
-
The use case I have in mind is of a person that wants to have minimal
infrastructure for their photos optimising the cost. In this scenario, the
need to have the thumbnails locally would be counterproductive as you would
require either a large disk (not cost effective) or a disk you can expand
often (not minimal infrastructure).
I guess what I am asking is whether this case should be supported or not. I
think that there are lots of people that would be happy with this if set up
efficiently because it removes the need to pay for a fixed amount of
storage and the operations with thumbnails would be very few.
But maybe doing something like this moves people away from self hosting and
this is not the point of the project.
El domingo, 17 de noviembre de 2024, CrushedAsian255 <
***@***.***> escribió:
… Thinking of how this could actually be implemented, should only the
originals be uploaded to S3 or should the thumbnails also be stored on S3?
—
Reply to this email directly, view it on GitHub
<#1683 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOIJVSB6CEH4MDGPOCFFH32BCONZAVCNFSM6AAAAAAVLNS2VWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRYGM2DMMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Feature detail
Right now, only a local folder is supported natively. Even though more can be supported through fuse mounted filesystems, but this method has drawbacks (performance hit mainly), so it would be nice to have support for more back-ends eventually.
S3 is an obvious choice that comes to mind and that would support a lot of providers, but there could be others (like WebDAV perhaps).
Platform
Server
Beta Was this translation helpful? Give feedback.
All reactions