github tis24dev/proxsave v0.3.0

latest releases: v0.11.15, v0.11.14, v0.11.13...
one month ago

๐Ÿš€ v0.3.0 โ€” Stability, Security & Reliability Update

This release introduces major stability, security, and consistency improvements across all modules.
It focuses on safe process handling, input sanitization, dependency validation, and robust backup synchronization.


๐Ÿงฉ Core Libraries

/lib/utils_counting.sh

Fixes

  • ๐Ÿงน Fixed nested quote syntax errors in error messages.
  • ๐Ÿ”’ Resolved compression extension pattern matching and prevented regex injection during backup counting.

/lib/utils.sh

Fixes

  • ๐Ÿง  Replaced command substitution with explicit if/else for path verification.
  • ๐Ÿ”ข Fixed compression ratio formatting (removed tilde and percent symbols).
  • ๐Ÿ” Removed command injection vulnerabilities in file search utilities.

Added

  • ๐Ÿงฉ Moved missing formatting utilities from metrics.sh to restore full dependency chain.

/lib/storage.sh

Fixes

  • ๐Ÿงฑ Replaced pipefail usage with subshell isolation for sync uploads.

Added

  • โš™๏ธ Added pipefail and progress logging to async upload functions.
  • ๐Ÿงญ Enhanced rclone failure detection in upload routines.

/lib/security.sh

Fixes

  • ๐Ÿงฉ Fixed false error return in install_missing_packages.
  • ๐Ÿ›‘ check_dependencies now stops correctly when dependency installation fails.

Added

  • ๐Ÿšจ Full completion check for safety controls โ€” script now issues a crash warning if errors occur.

/lib/notify.sh

Fixes

  • ๐Ÿง  Added missing status variable in create_email_body.
  • ๐Ÿ”— Telegram messages now use correct URL encoding.

/lib/metrics_collect.sh

Fixes

  • ๐Ÿ“ˆ Corrected file path extraction for calculating log age averages.

/lib/metrics.sh

Fixes

  • ๐Ÿงฎ report_metrics_error now increments counters correctly.
  • ๐Ÿงฉ validate_metrics_dependencies now correctly populates missing_optional.
  • ๐Ÿงพ Fixed divide-by-zero error in calculate_compression_ratio.

Added

  • ๐Ÿ”’ Unified lock mechanism for process synchronization.
  • ๐Ÿงฑ Moved formatting utilities to utils.sh for consistency.

/lib/log.sh

Fixes

  • ๐Ÿšซ Prevented unbound variable errors with set -u.
  • ๐Ÿงน Removed unsafe trap and redundant debug initialization.
  • โš™๏ธ Updated setup_logging() and start_logging() for safer initialization.

Added

  • ๐Ÿงฉ Introduced guard blocks protecting debug() and trace() functions.

/lib/core.sh

Fixes

  • ๐Ÿ“ Updated debug level documentation.
  • ๐Ÿงน Removed redundant set -euo pipefail.
  • โš ๏ธ Introduced CRITICAL error state for unrecoverable conditions.
  • ๐Ÿงผ Replaced rm -rf with safe_cleanup_temp_dir().

Added

  • ๐Ÿ›ก๏ธ Added safe_cleanup_temp_dir() with five safety guardrails.

/lib/backup_verify.sh

Fixes

  • ๐ŸŽฏ Corrected exit code tracking for critical_errors and sample_errors.
  • ๐Ÿงฉ Fixed mktemp usage for rclone temporary directories.

/lib/manager.sh

Fixes

  • ๐Ÿ”’ Fixed non-shared lock file race conditions.
  • ๐Ÿงฎ Prevented PID truncation (values >255).
  • ๐Ÿงฉ Fixed lost and mis-checked exit codes.
  • ๐Ÿงน Ensured cloud_storage lock release on errors.

/lib/backup_create.sh

Fixes

  • ๐Ÿงญ Fixed working directory corruption after find execution.

/lib/backup_collect.sh

Fixes

  • ๐ŸŒ€ Wrapped find loops in subshells and removed unsafe cd /tmp.

Added

  • ๐Ÿชถ Added .proxmox-backup-marker creation in setup_temp_dir().
  • ๐Ÿ’พ Added save/restore of DEBUG_LEVEL in check_env_file().

/lib/backup_collect_pbspve.sh

Fixes

  • ๐Ÿ” Improved sanitize_input() to preserve valid filesystem characters.
  • ๐Ÿงฉ Fixed quote escaping and exit code tracking in rclone calls.
  • ๐Ÿงฎ Added detailed data quality notes and documentation.

Added

  • ๐Ÿงฐ Introduced helper functions:
    safe_command(), safe_mkdir(), safe_stat_size(), validate_output_file().

/lib/environment.sh

Fixes

  • ๐Ÿงฉ Ensured lock directory creation before acquiring metrics lock.

Added

  • ๐Ÿชถ Added .proxmox-backup-marker after mkdir TEMP_DIR.
  • ๐Ÿ’พ Added save/restore of DEBUG_LEVEL in check_env_file().

โš™๏ธ Main Script

/script/proxmox-backup.sh

Fixes

  • ๐Ÿ”’ Improved lock cleanup with flock validation and orphan recovery.
  • ๐Ÿงน Replaced rm -rf with safe_cleanup_temp_dir().
  • ๐Ÿง  Improved dependency and lock handling with strict set -e.

Added

  • ๐Ÿ”„ Added flush operation in cleanup_handler.

๐Ÿ”’ Standalone Script โ€” security-check.sh

Fixes

  • ๐Ÿงฉ Improved safety checks, reliable hash validation, and parent-script detection.
  • ๐Ÿ” Hardened kernel, port, and file scans for better accuracy and input handling.

Added

  • ๐Ÿ—‚๏ธ Added $BASE_DIR/lock directory validation.
  • โš™๏ธ Added IPv6 filtering, outbound monitoring, and configurable suspicious port lists.
  • ๐Ÿงพ Implemented whitelist and associative map for safe filtering.
  • ๐Ÿง  Modernized detection with ss support and improved debug levels.

๐Ÿงฐ Standalone Script โ€” install.sh

Fixes

  • ๐Ÿงญ Forced switching to a safe directory before cloning or copying files to prevent
    fatal: Unable to read current working directory errors.

Added

  • ๐Ÿงฉ Applied chmod 744 to install.sh and new-install.sh immediately after cloning.

๐Ÿงฐ Standalone Script โ€” fix-permissions.sh

Added

  • ๐Ÿ”ง Included both installers in the maintenance routine.
  • ๐Ÿ› ๏ธ Ensured both stay at permission level 744 during updates and repairs.

โœ… Overall Improvements

  • Stronger process and lock synchronization.
  • Hardened temporary directory handling and cleanup.
  • Safer input, quote, and command validation.
  • Enhanced dependency and metrics management.
  • More accurate backup verification and reporting.
  • Improved fault tolerance in standalone security tools.
  • Added safe install and permission maintenance scripts.

โœจ Result: The system is now significantly more stable, secure, and resilient under all runtime conditions.


Compatibility: PVE and PBS
Installation: bash -c "$(curl -fsSL https://raw.githubusercontent.com/tis24dev/proxmox-backup/main/install.sh)"

Don't miss a new proxsave release

NewReleases is sending notifications on new releases.