Hey guys, im having a little trouble understanding why the following script isnt working, any help is appreciated.
#!/bin/sh
#prepare
TIME=$(date +%F_%R)
#collect backup
tar -zcvf /home/backup/BACKUPS/$TIME.tar.gz /home/
#send backup to external devices
screen -S SendBackup -d -m scp /home/backup/BACKUPS/$TIME.tar.gz backup@{external server
ip}:/home/backup/backups
sleep 5s
screen -S SendBackup -X stuff "{Password}\n"
#delete backup
find /home/backup/BACKUPS/ -type f -mmin +360 -delete
[link][10 comments]