Advertisement
pcwizz

Magic script so files can't be lost

Nov 17th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/bash
  2. i="0"
  3. while true
  4. do
  5. {
  6. echo
  7. date
  8. dest=backup/`date +%T_%d.%a`
  9. from=~/Documents
  10. mkdir $dest
  11. rsync -raz $from $dest
  12. echo complete
  13. } >> ~/backup.log 2>&1
  14. sleep 300
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement