From 61175feabddd7cca7549ad78e359746efa2896b8 Mon Sep 17 00:00:00 2001 From: Salt Date: Mon, 8 Jun 2020 08:47:13 -0500 Subject: [PATCH] Actually wait let's use the URL --- roles/nextcloud/templates/backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/nextcloud/templates/backup.sh b/roles/nextcloud/templates/backup.sh index 202aa9c..d9bfe85 100644 --- a/roles/nextcloud/templates/backup.sh +++ b/roles/nextcloud/templates/backup.sh @@ -48,11 +48,11 @@ if cd "{{ nextcloud_webroot }}"; then trap 'sudo -u www-data ./occ maintenance:mode --off' EXIT date="$(date -Iseconds)" log "Creating data backup" - tar czhf "$OUTDIR/nc-$date-data.tar.gz" "/var/nextcloud" --exclude "/var/nextcloud/*/files_trashbin" + tar czhf "$OUTDIR/{{ nextcloud_url }}-$date-data.tar.gz" "/var/nextcloud" --exclude "/var/nextcloud/*/files_trashbin" log "Creating webroot backup" - tar czf "$OUTDIR/nc-$date-webroot.tar.gz" "{{ nextcloud_webroot }}" + tar czf "$OUTDIR/{{ nextcloud_url }}-$date-webroot.tar.gz" "{{ nextcloud_webroot }}" log "Creating DB backup" - mysqldump nextcloud --single-transaction | gzip > "$OUTDIR/nc-$date-db.sql.gz" + mysqldump nextcloud --single-transaction | gzip > "$OUTDIR/{{ nextcloud_url }}-$date-db.sql.gz" log "Unsetting maintenance mode" sudo -u www-data ./occ maintenance:mode --off > /dev/null 2>&1 trap : EXIT