Updated the Cloudflare DNS backup script so it adds the files to a tar instead of just a folder

This commit is contained in:
2026-09-25 15:18:34 +01:00
parent 47f9fb9048
commit 569c8c41c9
@@ -65,5 +65,12 @@ for env_file in "${env_files[@]}"; do
echo "" echo ""
done 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'."