From 569c8c41c9651501ce68cb8adc63586539a28e59 Mon Sep 17 00:00:00 2001 From: Phil Date: Fri, 25 Sep 2026 15:18:34 +0100 Subject: [PATCH] Updated the Cloudflare DNS backup script so it adds the files to a tar instead of just a folder --- Export_DNS/Cloudflare/export_dns_cloudflare.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Export_DNS/Cloudflare/export_dns_cloudflare.sh b/Export_DNS/Cloudflare/export_dns_cloudflare.sh index b86e4d6..b08b09c 100755 --- a/Export_DNS/Cloudflare/export_dns_cloudflare.sh +++ b/Export_DNS/Cloudflare/export_dns_cloudflare.sh @@ -65,5 +65,12 @@ for env_file in "${env_files[@]}"; do echo "" done -echo "All exports finished. Files are in the '$OUTPUT_DIR' folder." +# Create tar archive of the export directory +TAR_FILE="$EXPORT_FOLDER/${DATE_DIR}.tar.gz" +echo "Creating tar archive: $TAR_FILE" +tar -czf "$TAR_FILE" -C "$EXPORT_FOLDER" "$DATE_DIR" +# Optional: Remove the directory after creating the tar (comment out if you want to keep it) +rm -rf "$OUTPUT_DIR" + +echo "All exports finished. Archive created at '$TAR_FILE'."