From 4c829bf78206973e2e351cfebd56de05d81f4b60 Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 6 May 2020 03:27:53 -0500 Subject: [PATCH] Exclude users' trash directories when making a NC backup --- roles/nextcloud/templates/backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/templates/backup.sh b/roles/nextcloud/templates/backup.sh index e1976bd..008a19c 100644 --- a/roles/nextcloud/templates/backup.sh +++ b/roles/nextcloud/templates/backup.sh @@ -43,7 +43,7 @@ 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/$date-data.tar.gz" "/var/nextcloud" + tar czhf --exclude "files_trashbin" "$OUTDIR/$date-data.tar.gz" "/var/nextcloud" log "Creating webroot backup" tar czf "$OUTDIR/$date-webroot.tar.gz" "{{ nextcloud_webroot }}" log "Creating DB backup"