Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17822

Backup script help

$
0
0

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

submitted by TheShadyOneHD
[link][10 comments]

Viewing all articles
Browse latest Browse all 17822

Trending Articles