From c68def849bffc59c0e61b799436f3cf55fb7e31b Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 11 Jul 2020 09:51:19 -0500 Subject: [PATCH] Disable monthly huge backups Alright this was a bad idea --- roles/desktop/templates/backup.sh | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/roles/desktop/templates/backup.sh b/roles/desktop/templates/backup.sh index b4a1b5c..5c9690b 100644 --- a/roles/desktop/templates/backup.sh +++ b/roles/desktop/templates/backup.sh @@ -41,27 +41,27 @@ for dir in /home/*; do [ -d "$dir/.backup" ] || continue for file in "$dir/.backup/"*; do [ -e "$file" ] || continue; done tar czhf "$OUTDIR/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds).tar.gz" "$dir/.backup/"* - if (( "$(date +%d)" == "1" )) || [ -f "$forcefile" ]; then - log "Detected conditions for monthly dump" - if command -v aws > /dev/null 2>&1 && aws s3 ls "s3://$s3bucket" > /dev/null 2>&1; then - # Time for huge backups piped straight to S3 - tar cz \ - --exclude "$dir/.ansible" \ - --exclude "$dir/.backup" \ - --exclude "$dir/.cache" \ - --exclude "$dir/.steam" \ - --exclude "$dir/Downloads" \ - --exclude "$dir/Dropbox" \ - --exclude "$dir/Nextcloud" \ - --exclude "$dir/snap" \ - "$dir/."* \ - | aws s3 cp - "s3://$s3bucket/{{ inventory_hostname }}/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds)-full.tar.gz" \ - --only-show-errors \ - --storage-class STANDARD_IA - else - log "Could not satisfy requirements for AWS CLI" - fi - [ -f "$forcefile" ] && rm "$forcefile" - fi +# if (( "$(date +%d)" == "1" )) || [ -f "$forcefile" ]; then +# log "Detected conditions for monthly dump" +# if command -v aws > /dev/null 2>&1 && aws s3 ls "s3://$s3bucket" > /dev/null 2>&1; then +# # Time for huge backups piped straight to S3 +# tar cz \ +# --exclude "$dir/.ansible" \ +# --exclude "$dir/.backup" \ +# --exclude "$dir/.cache" \ +# --exclude "$dir/.steam" \ +# --exclude "$dir/Downloads" \ +# --exclude "$dir/Dropbox" \ +# --exclude "$dir/Nextcloud" \ +# --exclude "$dir/snap" \ +# "$dir/."* \ +# | aws s3 cp - "s3://$s3bucket/{{ inventory_hostname }}/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds)-full.tar.gz" \ +# --only-show-errors \ +# --storage-class STANDARD_IA +# else +# log "Could not satisfy requirements for AWS CLI" +# fi +# [ -f "$forcefile" ] && rm "$forcefile" +# fi done