Updated the Cloudflare DNS backup script so it adds the files to a tar instead of just a folder
This commit is contained in:
@@ -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'."
|
||||
|
||||
Reference in New Issue
Block a user