Here's the updated README.md file that reflects your improved, secure, and feature-rich AutoBackup Pro project with encryption, logging, GUI menus, email alerts, retention policy, and Google Drive integration readiness:
AutoBackup Pro is a secure, automated Bash-based backup and restore utility with optional email alerts, retention control, encryption using GPG, and an intuitive terminal-based menu powered by whiptail.
- Encrypted Backups (
.tar.gz.gpg) using GPG symmetric encryption. - Interactive TUI Menu with options to Backup, Restore, or View Logs.
- Auto Logging of backup/restore operations.
- Email Notifications on success/failure.
- Retention Policy: Auto-deletes oldest backups beyond the max allowed.
- One-Command Installer: Easily install as a global command (
autobackup). - Restore Interface: Browse and decrypt backups safely.
- Linux/macOS or WSL
bash,gpg,tar,whiptail,mailutils, and optionallyrclonefor cloud- SMTP configured (
ssmtpormsmtp) for email alerts
-
Clone the repository:
git clone https://github.com/glenjaysondmello/Automated-Backup-Script.git cd Automated-Backup-Script -
Make all scripts executable:
chmod +x *.sh -
Configure your
.envfile:cp .env.example .env # Edit .env with your values -
Install globally:
./install.sh
✅ Now you can run it from anywhere using:
autobackup
To uninstall:
./uninstall.shSOURCE_DIR="$HOME/Documents"
BACKUP_DIR="$HOME/AutoBackups/backups"
LOG_FILE="$HOME/AutoBackups/backup.log"
MAX_BACKUPS=5
ENCRYPTION_PASSPHRASE="MyStrongPassword123!"
EMAIL="youremail@example.com"autobackup
# Or directly:
./autoBackup.shCreates encrypted .tar.gz.gpg backup of $SOURCE_DIR, logs the result, and emails you.
./restore.sh- Choose an encrypted
.gpgfile - Specify (or accept default) restore location
- Decrypts and extracts
From menu:
autobackup → View Backup LogOr directly:
cat "$LOG_FILE"tar -czvf - -C "$SOURCE_DIR" . | \
gpg --symmetric --batch --passphrase "$ENCRYPTION_PASSPHRASE" -o "$BACKUP_DIR/$ENCRYPTED_FILE"- Sends success/failure emails
- Prunes old backups based on
MAX_BACKUPS
gpg --batch --yes --passphrase "$ENCRYPTION_PASSPHRASE" -d "$BACKUP_DIR/$ENCRYPTED_FILE" | \
tar -xzv -C "$RESTORE_DIR"whiptail GUI lets you:
- Backup
- Restore
- View logs
- Exit
You can use rclone to upload backups to:
- Google Drive
- Dropbox
- OneDrive
- S3, etc.
Example command:
rclone copy "$BACKUP_DIR/$ENCRYPTED_FILE" remote:backups --log-file="$LOG_FILE"
⚠️ If distributing this script to others, avoid hardcoding sensitiveclient_idor secrets. Guide users to configure their own remotes usingrclone config.
Schedule a daily backup:
crontab -eAdd:
0 0 * * * /usr/local/bin/autobackupBefore Backup
~/Documents/
├── file1.txt
└── Notes/
└── note.md
After Backup
~/AutoBackups/backups/
└── backup_2025-07-31_22-45-00.tar.gz.gpg
After Restore
~/RestoredFiles/
├── file1.txt
└── Notes/
└── note.md
Contributions welcome! Ideas:
- GUI version (Zenity)
- Incremental backups
- Cloud sync options
- Password prompts with confirmation
MIT License
Glen Jayson D'Mello GitHub: glenjaysondmello
Would you like this saved as a README.md file now?