Backing up Immich
fedilink

The backup doc from Immich states that one should use Postgres’ dump functionality to backup the database, as well as copy the upload location.

Is there any counter indication to doing this instead:

  • Create a dir immich with subdirs db and library
  • Mount the db dir as a volume for the database
  • Mount the library dir as a volume for the upload location
  • Backup the whole immich dir without dumping the Postgres db. (Stop Immich while before doing this)

If PostgreSQL is also shut down and you dont start the backup before its completely stopped it should be ok. You might need to restore to the same version of PostgreSQL and make sure it is setup the same way. If you dump the data, it is safer, both that you get a known good state, and that it can be restored to any new database. Grabbing the files as you suggest should be ok at least 90 percent of the time. But why risk it?

Eskuero
link
fedilink
English
36M

I do this always for any service but also do a dump of the db in the top directory to keep a clean copy to could be version independent. They wont take much more space ho estly

@JASN_DE@lemmy.world
link
fedilink
English
26M

It’s the way I do all of my service backups. One separate DB container per docker stack so nothing else is in there, all the data in one folder, and off we go at 1AM.

Avid Amoeba
creator
link
fedilink
English
16M

Yeah, also I don’t run the latest version of the app in order to avoid breakage. I pin some tag so the app version so there shouldn’t be a significant version mismatch during restore. I think @Esquero’s suggestion to also dump the db just in case makes sense too. I’m gonna be writing a backup script / systemd unit anyways, might as well as a couple of lines for that.

@keyez@lemmy.world
link
fedilink
English
56M

They do have a doc for this. https://immich.app/docs/administration/backup-and-restore/

I dump my immich db weekly and every 2 weeks sync the media folders to a remote destination

Avid Amoeba
creator
link
fedilink
English
26M

Thanks all for the comments and suggestions!

Create a post

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:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 279 users / day
  • 589 users / week
  • 1.34K users / month
  • 4.55K users / 6 months
  • 1 subscriber
  • 3.47K Posts
  • 69.3K Comments
  • Modlog