Exclude users' trash directories when making a NC backup

This commit is contained in:
Salt 2020-05-06 03:27:53 -05:00
parent 4a7a5f4645
commit 4c829bf782

View File

@ -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"