Adds immich, puts redis/database on NVME, uses postgres for wallabag and nextcloud, adds backup services
This commit is contained in:
13
files/backup-postgres.sh
Normal file
13
files/backup-postgres.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -o errexit -o pipefail -o noclobber -o nounset -o errtrace -o functrace
|
||||
|
||||
user="$(whoami)"
|
||||
today=$(date +%F)
|
||||
dir="/backup/${today}"
|
||||
host_dir="/var/mnt/nas/containers/${user}/storage/database-backup"
|
||||
mkdir -p "${host_dir}"
|
||||
if podman container exists "${user}-database"; then
|
||||
podman exec "${user}-database" pg_dump -U "${user}" -d "${user}" -F d -Z zstd:3 -f "${dir}"
|
||||
else
|
||||
echo "${user}-database" not found
|
||||
fi
|
||||
Reference in New Issue
Block a user