Disable monthly huge backups
Alright this was a bad idea
This commit is contained in:
parent
d39ae2bc85
commit
c68def849b
@ -41,27 +41,27 @@ for dir in /home/*; do
|
|||||||
[ -d "$dir/.backup" ] || continue
|
[ -d "$dir/.backup" ] || continue
|
||||||
for file in "$dir/.backup/"*; do [ -e "$file" ] || continue; done
|
for file in "$dir/.backup/"*; do [ -e "$file" ] || continue; done
|
||||||
tar czhf "$OUTDIR/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds).tar.gz" "$dir/.backup/"*
|
tar czhf "$OUTDIR/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds).tar.gz" "$dir/.backup/"*
|
||||||
if (( "$(date +%d)" == "1" )) || [ -f "$forcefile" ]; then
|
# if (( "$(date +%d)" == "1" )) || [ -f "$forcefile" ]; then
|
||||||
log "Detected conditions for monthly dump"
|
# log "Detected conditions for monthly dump"
|
||||||
if command -v aws > /dev/null 2>&1 && aws s3 ls "s3://$s3bucket" > /dev/null 2>&1; then
|
# 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
|
# # Time for huge backups piped straight to S3
|
||||||
tar cz \
|
# tar cz \
|
||||||
--exclude "$dir/.ansible" \
|
# --exclude "$dir/.ansible" \
|
||||||
--exclude "$dir/.backup" \
|
# --exclude "$dir/.backup" \
|
||||||
--exclude "$dir/.cache" \
|
# --exclude "$dir/.cache" \
|
||||||
--exclude "$dir/.steam" \
|
# --exclude "$dir/.steam" \
|
||||||
--exclude "$dir/Downloads" \
|
# --exclude "$dir/Downloads" \
|
||||||
--exclude "$dir/Dropbox" \
|
# --exclude "$dir/Dropbox" \
|
||||||
--exclude "$dir/Nextcloud" \
|
# --exclude "$dir/Nextcloud" \
|
||||||
--exclude "$dir/snap" \
|
# --exclude "$dir/snap" \
|
||||||
"$dir/."* \
|
# "$dir/."* \
|
||||||
| aws s3 cp - "s3://$s3bucket/{{ inventory_hostname }}/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds)-full.tar.gz" \
|
# | aws s3 cp - "s3://$s3bucket/{{ inventory_hostname }}/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds)-full.tar.gz" \
|
||||||
--only-show-errors \
|
# --only-show-errors \
|
||||||
--storage-class STANDARD_IA
|
# --storage-class STANDARD_IA
|
||||||
else
|
# else
|
||||||
log "Could not satisfy requirements for AWS CLI"
|
# log "Could not satisfy requirements for AWS CLI"
|
||||||
fi
|
# fi
|
||||||
[ -f "$forcefile" ] && rm "$forcefile"
|
# [ -f "$forcefile" ] && rm "$forcefile"
|
||||||
fi
|
# fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user