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'."