diff --git a/helios/external-backup.sh b/helios/external-backup.sh index 095cb02..127b4cc 100644 --- a/helios/external-backup.sh +++ b/helios/external-backup.sh @@ -183,6 +183,7 @@ backupNC () { NCOCC="sudo -u www-data php $NCDIR/occ" NCDATADIR="$($NCOCC config:system:get datadirectory)" NCDUMPSDIR="$NCDATADIR/sqldumps" + NCBKPPATH="$DATA_PATH/"$SERVER"/daily.0$NCDATADIR" DBPASSWORD="$($NCOCC config:system:get dbpassword)" DBNAME="$($NCOCC config:system:get dbname)" DBHOST="$($NCOCC config:system:get dbhost)" @@ -206,7 +207,8 @@ backupNC () { echo "Backup $NCDATADIR" - rsync -aAXHh --stats --numeric-ids --noatime --delete --delete-excluded $NCDATADIR/ $DATA_PATH/"$SERVER"/daily.0$NCDATADIR + mkdir -p $NCBKPPATH + rsync -aAXHh --stats --numeric-ids --noatime --delete --delete-excluded $NCDATADIR/ $NCBKPPATH STATUSCODE=$?