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

move data questions #226

Open
blublub opened this issue Oct 5, 2024 · 1 comment
Open

move data questions #226

blublub opened this issue Oct 5, 2024 · 1 comment
Labels
question Further information is requested

Comments

@blublub
Copy link

blublub commented Oct 5, 2024

Question

Hi
due to many users having the same images storage requirement are quite high.

My workaround was to use ZFS with dedup. Tests so far have shown a reduction of 75% in storage space - so it is worth it.

As mentioned symlinks do not work, I somehow missed the project page in the first test run...argh...

In the "how to" it is only described to move library or upload - is there any problem with moving everything in "common"? So also DB etc..

The advantage would be that all my installation data (imags and DB) would reside in a separate vhdx file (running hyperV here) which can be easily backed up later without using the CLI.
In case of problems I can attach this vhdx to a new immich installation/VM - so basically a "complete" backup, or would that be problematic due to the DB password as the new immich installation would use a new pwd - could the pwd for the new installation be changed?

thx

@blublub blublub added the question Further information is requested label Oct 5, 2024
@nsg
Copy link
Owner

nsg commented Oct 7, 2024

From the point of view of snapd, I think it should work to mount an external storage and/or bind mount to /var/snap/immich-distribution/common/, I have never tried it and I'm not sure how future proof it is. /var/snap is actually a ZFS dataset on my personal laptop.

Possible problems that I can imagine:

  • A new installation will fail because /var/snap/immich-distribution/ is not empty. Workaround: install it normally and then move the folder.
  • Removal will probably fail, because snapd can't remove common
  • It's possible that any future snapd will do something that do not play nice with the mount

It would probably be safer to mount to /var/snap/immich-distribution or even better /var/snap if possible.

Talking about the databases, postgresql och redis I believe that both will play nice. Redis is just a cache for Immich, but remember that you will most likely backup an incomplete state if you just backup the files from a database like postgres.

You can get/set the database password with snap get immich-distribution database-password.

To summarize

Yes, I think this should work. But it may break or need manual tweaks in the future.

My take

I run Immich inside a system container (more or less identical to a VM), the entire system (/) is a ZFS dataset. I just snapshot the entire thing. The OS is tiny compared to all images and videos. Just a little bit extra data.

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

No branches or pull requests

2 participants