This script automatically backs up any encrypted password files updated within the last 24 hours on the system. It eliminates the need for manual backups, improving efficiency and reducing human error.
Before running the script, ensure you have the following:
- Linux or macOS: This script is written for Unix-based systems.
- Encryption Tools: Ensure that your system supports the required encryption/decryption commands.
- Backup Directory: A directory where the backup files will be stored (ensure the script has write access to this directory).
-
Clone the repository:
git clone https://github.com/DinethDilhara/secure-auto-backup-script.git
-
Make the script executable
chmod +x backup.sh
-
Run the script
./backup.sh
-
To automate the script
To automate the script execution daily, add the following entry to your cron jobs:
crontab -e
0 0 * * * /path/to/backup.sh
The backup.sh
script performs the following tasks:
- Finds files updated in the last 24 hours.
- Creates a backup of these files in a secure location.
- Outputs a log of the backup process for tracking purposes.
This script is the final project for the Hands-on Introduction to Linux Commands and Shell Scripting course by IBM.