Guest User

Untitled

a guest
Mar 2nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh -e
  2. #
  3. # Basic Backup to my Fritz!Box
  4. #
  5. DATER=`date +%b%_3d%_9T`
  6. #
  7. # Mount the Box
  8. #
  9. echo $DATER fritzcopy: creating local folder
  10. if [ ! -d /mnt/fritzcopy ]
  11. then
  12. mkdir /mnt fritzcopy
  13. fi
  14. echo $DATER fritzcopy: mounting remote folder
  15. if !(/bin/mount -t cifs -o user=ftpuser,password=xxx,workgroup=WORKGROUP //fritz.box/fritz.nas/Initio-INI-T640-01/Music /mnt/fritzcopy)
  16. then
  17. echo $DATER fritzcopy: mount failed: could not mount remote share
  18. echo $DATER fritzcopy: terminated with error 1
  19. exit 1
  20. fi
  21. echo $DATER fritzcopy: syncing Music folder
  22. echo $DATER fritzcopy: creating local iTunes folder
  23. if [ ! -d /mnt/fritzcopy/iTunes ]
  24. then
  25. mkdir /mnt/fritzcopy/iTunes
  26. fi
  27. rsync -rlptDv –modify-window=1 --dry-run ~/Music/iTunes /mnt/fritzcopy/iTunes
Add Comment
Please, Sign In to add comment