Some useful linux scripts
- Backup Script
This script automates the backup of a specified directory to a backup destination and sends an email notification upon completion.
- Set the source directory to be backed up by modifying the
source_dirvariable in the script. - Set the destination directory where backups will be stored by modifying the
backup_dirvariable in the script. - Set the email address to receive notifications by modifying the
email_addressvariable in the script. - Set up an SMTP server configuration for sending emails (e.g., Gmail SMTP).
- Make sure the required packages for sending emails are installed (e.g.,
ssmtp,mailutils). - Make the script executable:
chmod +x backup_script.sh
- Run the Script ./backup_script.sh