Skip to content

Instantly share code, notes, and snippets.

View Chuckame's full-sized avatar

Chuckame Chuckame

View GitHub Profile
@Chuckame
Chuckame / db-backup.sh
Last active October 24, 2024 10:17
Backup and restore immich database: scripts made to easily backup the immich database in a docker compose env. You need the `DB_BACKUP` and `DB_BACKUPS_FOLDER` set in your `.env`, then just execute `./db-backup.sh`
#!/usr/bin/env bash
####
# This script use .env where should be defined DB_FOLDER (the PG data folder) and DB_BACKUPS_FOLDER (the backups location).
# It stops the immich stack then make the backup by zipping the db data to a tar file.
####
set -a
source .env
@Chuckame
Chuckame / lxc.conf
Last active June 14, 2025 22:27
Unraid: mount share in LXC
# Add this line in your container that needs to mount a share.
# The target path will be relative to the root of the container.
# Note the missing slash '/' in the target path. In the example, the mount point will be at /<target path>
# Without 'create=dir', the container won't be able to start as the /<target path> have to exist to mount properly
lxc.mount.entry = /mnt/user/<the share name> <target path> none bind,create=dir 0 0