Add immich as gallery
This commit is contained in:
parent
6574543759
commit
24d93ecad6
7 changed files with 116 additions and 2 deletions
5
roles/backup/files/node002/immich.sh
Executable file
5
roles/backup/files/node002/immich.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
backup_path="$BACKUP_LOCATION/immich"
|
||||
mkdir -p "$backup_path"
|
||||
|
||||
cd /opt/services/immich || exit
|
||||
docker compose exec database pg_dump -U "$DB_USERNAME" "$DB_DATABASE" | gzip >"$backup_path/immich.sql.gz"
|
|
@ -6,9 +6,9 @@ postgres_tables=$(sudo -u postgres psql -Atc "SELECT datname FROM pg_database WH
|
|||
for i in $postgres_tables
|
||||
do
|
||||
printf "dumping %s ..." "$i"
|
||||
sudo -u postgres pg_dump "$i" | gzip >"pg_dump_$i.gz"
|
||||
sudo -u postgres pg_dump "$i" | gzip >"pg_dump_$i.sql.gz"
|
||||
echo " done"
|
||||
done
|
||||
|
||||
echo "dumping all"
|
||||
sudo -u postgres pg_dumpall | gzip >"pg_dumpall.gz"
|
||||
sudo -u postgres pg_dumpall | gzip >"pg_dumpall.sql.gz"
|
||||
|
|
Reference in a new issue