Don't take a DB backup for a DB that doesn't exist, Nextcloud

This commit is contained in:
Salt 2020-08-15 16:02:28 -05:00
parent 2a1299e9e0
commit 94e35ccbb7

View File

@ -48,8 +48,6 @@ if cd "{{ nextcloud_webroot }}"; then
tar czhf "$OUTDIR/{{ nextcloud.url }}-$date-data.tar.gz" "/var/nextcloud" --exclude "/var/nextcloud/*/files_trashbin"
log "Creating webroot backup"
tar czf "$OUTDIR/{{ nextcloud.url }}-$date-webroot.tar.gz" "{{ nextcloud_webroot }}"
log "Creating DB backup"
mysqldump nextcloud --single-transaction | gzip > "$OUTDIR/{{ nextcloud.url }}-$date-db.sql.gz"
else
log "Could not change directory: $OUTDIR"
return 3