Added skip if not installed on backuptool

This commit is contained in:
root 2023-11-28 16:41:53 +00:00
parent b2cbf83096
commit 6a6b0bfd52

View File

@ -82,6 +82,10 @@ backupserviceall() {
echo "* Backing up all services.." echo "* Backing up all services.."
for i in "${SERVICES[@]}"; do for i in "${SERVICES[@]}"; do
# If app isn't installed then skip
[ ! -d "/federated/apps/$i" ] && echo "$i not installed, skipping." && continue
# Backup service
echo "** Backing up $i.." echo "** Backing up $i.."
if [ "$i" = "postgresql" ]; then if [ "$i" = "postgresql" ]; then
docker exec postgresql /bin/bash -c "pg_dumpall --globals-only -c -U postgres | gzip -9 > /docker-entrypoint-initdb.d/dump_$i.sql.gz" docker exec postgresql /bin/bash -c "pg_dumpall --globals-only -c -U postgres | gzip -9 > /docker-entrypoint-initdb.d/dump_$i.sql.gz"