view the rest of the comments
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Immich has so many dirs and files that it will take hour/hours for any file-based program to walk that tree (on an HDD) in order to do a backup. I used to use rsync, syncthing, duplicity and had gotten it to about under an hour for 1TB library. The service has to be shutdown to preserve consistency of the backup. So that downtime was okay once per day. Still a heavy operation. Not great, not terrible.
Because of the above you might want to do one of the following:
So depending on how painful migrations are for you, I'd highly recommend the latter. Otherwise the former. The ZFS snapshot send strategy works for any service you may run.
Immich uses
user/YYYY/MMfolders on my setup, and I exclude any thumbnail directories from the backup too. So not many dirs/files to check for the backup software and it's very quick.You don't need to shut it down, pg_dump works fine while it's like if you want to make sure it's a good database backup. The files side of things are fine either way.
That makes sense. I copy the whole set of data dirs so I can trivially start it after restore or start it elsewhere without extra steps. Also because this strategy works with all services so I don't have to consider how to backup/restore each one. Makes adding new services less work.
pgdump with live file copy while the service is in active use can result in files the db doesn't know about, or files it thinks are there that were actuall deleted. Probably can be fixed after the fact.
More generally, as a someone who's done software for a very long time, I've learned that the further away I go from the happy path of a software program, the less tested it is, the more bugs there are and the poorer the edge case handling is. It's inherent to software development with limited labour. So for backups I lean on the process kill/recovery edge case that they all must handle. Snapshot + backup from that snapshot looks like a process death to the service upon restore.
That's fair, shutdown service + backup everything is certainly more guaranteed to work properly.
With Immich I'm not too worried about the DB potentially being off since it can rescan the filesystem, but I also backup at 3am when nothing is happening on Immich because I'm asleep!
If you do it at 3AM anyway... may as well eliminate the need to even think about mismatches. 😁 I think mine also used to do it at 3AM before I switched to ZFS snapshots + send/recv.