Skip to content

Releases: allanlopesprado/glpi-backup

Release v2.0.0

10 Dec 05:57
697b4eb

Choose a tag to compare

Overview

This release represents a refactoring of the codebase to improve security and reliability. The script has been updated to prevent credential exposure in system process lists and to implement atomic file operations, ensuring that partial or corrupted backups are not retained in the event of a failure.

Key Features

Enhanced Security

  • Secure Authentication: Database passwords are no longer passed via command line arguments (hiding them from ps aux). We now use temporary, permission-locked .my.cnf files.
  • Access Control: Backup artifacts and temporary directories are created with strict permissions (chmod 600/700), accessible only by the root user.

Atomic Operations & Reliability

  • Atomic Writes: Backups are generated in a temporary directory and only moved to the final destination upon 100% success. No more corrupted or partial files in your backup folder.
  • Lock Mechanism: Prevents multiple instances of the script from running simultaneously.
  • Pre-flight Checks: Automatically checks for available disk space and required dependencies (tar, mysqldump, sha256sum) before starting.

Data Integrity

  • Checksum Generation: Every backup now includes a checksums.sha256 file to verify file integrity in the future (protection against bit rot or transfer errors).

Observability

  • Notifications: Native support for Webhooks (Discord, Slack, Teams) to send alerts on success or failure.
  • Logging: Improved logging format with timestamps and error tracking.

Changes

  • Configuration: Settings are now loaded from an external file (/etc/glpi/glpi-backup.conf) for better security and management.
  • Structure: Backups are organized into date-stamped subdirectories.

Upgrade Notice

Since the configuration method has changed, please refer to the new glpi-backup.conf structure in the README or the script header before running this version.

Full Changelog: v1.0.0...v2.0.0

Release v1.0.0

01 Aug 12:59
755d31d

Choose a tag to compare

Overview

This is the initial release of backup-glpi.sh, an automated script for backing up GLPI (Gestionnaire libre de parc informatique). This script is designed to facilitate the backup of both the GLPI database and associated files.

Features

  • Automated Backup: Automates the process of backing up the GLPI database and associated files.
  • Database Backup: Creates a compressed backup of the GLPI database using mysqldump and gzip.
  • Files Backup: Archives and compresses key GLPI directories, excluding temporary or unnecessary files.
  • Backup Logging: Records all backup operations and status messages in /var/log/glpi/backup.log.
  • Log Rotation: Configures automatic weekly log rotation to manage and compress old log files.
  • Old Backup Cleanup: Removes backup files older than 5 days to free up storage space.