This project demonstrates a secure, automated backup system built using:
- Bash scripting for automation
- GPG for encryption
- Cron for scheduling
- AWS S3 (or Google Drive via rclone) for offsite storage
Itβs designed as a learning + portfolio project to showcase system administration, security, and cloud integration skills.
- π Compress files/folders into
.tar.gz - π Encrypt backups with GPG (asymmetric encryption)
- βοΈ Upload to AWS S3 (or Google Drive alternative)
- β»οΈ Automated with cron jobs
- β Restore tested (backup β decrypt β extract)
automating-backups/
βββ backup.sh # Main backup script
βββ sample_crontab.txt # Example cron schedule
βββ README.md # Documentation
βββ screenshots/
git clone https://github.com/KavinduDr/Automating-backups.git
chmod +x backup.sh
BACKUP_SRC="/var/www/html" # Or your chosen directory
BACKUP_DEST="/home/ubuntu/backup-project/backups"
GPG_RECIPIENT="Your Name <[email protected]>"
./backup.sh
to install :
crontab sample_crontab.txt
gpg -d backups/backup_2025-08-30_10-25-12.tar.gz.gpg > restore.tar.gz
tar -xzf restore.tar.gz -C /path/to/restore/