- After I opened the terminal, I typed this command:
moabdelaziz@pop-os:\~$ crontab -r
- And scheduled the task:
* * * * * /bin/bash /home/moabdelaziz/Backups/backup.sh >> /home/moabdelaziz/output.txt
- backup.sh
#!/bin/bash
TargetDir=/home/mohamed/Date
TargetBackup=/home/mohamed/Backup
EncryptionKey="PASS"
days=12
source ../backup_restore_lib.sh
validate_backup_params ${TargetDir} ${TargetBackup} ${EncryptionKey} ${days}
backup ${TargetDir} ${TargetBackup}
- backup_restore_lib.sh contains those functions
validate_backup_params {...}
Encryption {...}
Decryption {...}
remote_server {...}
backup {...}
validate_restore_params {...}
restore {...}
Unfortunately, it does not work :(.
Can anyone point me to anything I'm doing wrong? Thanks in advance!