BackupGuardian is a production-ready Bash utility that automates Linux directory backups by creating compressed, timestamped archives while maintaining detailed logs and automatically enforcing backup retention policies.
Designed as a practical Linux administration project, BackupGuardian demonstrates Bash scripting, archive management, automation, logging, and backup lifecycle management.
- 💾 Creates compressed
.tar.gzbackups - 🕒 Generates timestamped backup archives
- 📝 Maintains detailed backup logs
- 🧹 Automatically removes backups older than a configurable retention period
- ⚡ Lightweight and easy to deploy
- 🐧 Compatible with most Linux distributions
- ⏰ Supports scheduled execution with
cron
BackupGuardian/
├── smart-backup.sh
├── backups/
├── logs/
└── README.md
Note: The script filename can remain
smart-backup.shif you prefer, although renaming it tobackupguardian.shorbackup-guardian.shwould better match the repository branding.
Clone the repository:
git clone https://github.com/Kachinonye/BackupGuardian.gitNavigate to the project directory:
cd BackupGuardianMake the script executable:
chmod +x smart-backup.shRun the backup utility:
./smart-backup.shThe script automatically:
- Creates a compressed backup archive.
- Appends a timestamp to the filename.
- Records the operation in a log file.
- Deletes backup archives older than the configured retention period.
Documents_2026-07-05_103000.tar.gz
Every backup operation is recorded with timestamps, allowing administrators to verify successful executions and troubleshoot backup failures.
Logged information includes:
- Backup start time
- Source directory
- Backup filename
- Completion status
- Cleanup operations
This project showcases practical experience with:
- Linux System Administration
- Bash Shell Scripting
- Backup Automation
- Archive Management (
tar) - Compression (
gzip) - Log Management
- Retention Policy Implementation
- Cron Scheduling
- File System Administration
- Technical Documentation
BackupGuardian is suitable for:
- Linux System Administrators
- DevOps Engineers
- Home Lab Environments
- Small Business Servers
- Scheduled Workstation Backups
- Students learning Linux administration
Future releases may include:
- Incremental backups
- Restore mode
- Email notifications
- Backup verification
- Configuration file support
- Compression level selection
- Backup encryption
- Cloud storage integration (AWS S3, Google Drive)
- Progress indicators
Kachinonye Nmezi
Junior Linux Administrator | Bash Scripting & Automation Specialist
GitHub: https://github.com/Kachinonye
LinkedIn: https://www.linkedin.com/in/kachinonye-nmezi-74170723b/
Licensed under the MIT License.