https://github.com/luciaheredia/automatedbackup
Automated Backup Bash Script
https://github.com/luciaheredia/automatedbackup
bash bash-script linux-shell
Last synced: about 1 month ago
JSON representation
Automated Backup Bash Script
- Host: GitHub
- URL: https://github.com/luciaheredia/automatedbackup
- Owner: LuciaHeredia
- Created: 2024-12-16T13:57:16.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-01-17T23:03:58.000Z (9 months ago)
- Last Synced: 2025-06-08T13:42:41.695Z (4 months ago)
- Topics: bash, bash-script, linux-shell
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Automated Backup Bash Script.
## Steps To Make:
1. Setting up the Backup Script:
- create a directory for the script and place it there.
- set up "source directory" and "destination directory".
- make the script executable: ```chmod u+x script.sh```
2. Create a Group:
- use the groupadd command to create a new group named "backupusers": ```sudo groupadd backupusers** ```
3. Configure Group Permissions:
- change the ownership of the script to the new group: ```chown :backupusers script.sh```
- allow the group to execute the scrip: ```chmod g+x script.sh```
4. Create a User:
- use the useradd command to create a new user named "backupuser":
```sudo useradd -m -G backupusers backupuser```
- add new user to the group:
```sudo usermod -a -G backupusers backupuser```
- Set a password for the new user: ```sudo passwd backupuser```
5. Schedule the Backup Script to run automatically with a Cron Job:
- open the crontab for the "backupuser": ```sudo crontab -u backupuser -e```
- schedule the backup script to run daily at 12:00 PM : ```0 12 * * * /path/to/script.sh```
6. Testing:
- manually testing the script to ensure it works: ```sudo -u backupuser /path/to/script.sh```