Ensure nextcloud backup path exists
This commit is contained in:
parent
eba6edff6c
commit
ba5885dd36
1 changed files with 3 additions and 1 deletions
|
@ -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=$?
|
||||
|
||||
|
|
Loading…
Reference in a new issue