Guest User

Untitled

a guest
Mar 13th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Minecraft ramdisk restore
  4.  
  5. BASEDIR=/home/minecraft/
  6. ORIGDIR=${BASEDIR}mountPoint
  7. BACKUPDIR=${BASEDIR}backups/latest/
  8.  
  9. mount ${ORIGDIR}
  10. if [ $? = 0 ]; then
  11. echo "-------------------------------------------------"
  12. echo "Success to mount Ramdisk on ${ORIGDIR}"
  13. echo "-------------------------------------------------"
  14. else
  15. echo "-------------------------------------------------"
  16. echo "Failed to mount Ramdisk !!"
  17. echo "-------------------------------------------------"
  18. exit 1
  19. fi
  20.  
  21. rsync -rl0tcv ${BACKUPDIR} ${ORIGDIR} > ${BASEDIR}rsyncr.log
  22. if [ $? = 0 ]; then
  23. echo "-------------------------------------------------"
  24. echo "Success to restore latest files to ${ORIGDIR}"
  25. echo "-------------------------------------------------"
  26. else
  27. echo "-------------------------------------------------"
  28. echo "Failed to restore latest files to ${ORIGDIR}!!"
  29. echo "-------------------------------------------------"
  30. exit 1
  31. fi
  32.  
  33. echo "-------------------------------------------------"
  34. df
  35. echo "-------------------------------------------------"
  36. ls -l ${ORIGDIR}
  37. echo "-------------------------------------------------"
Add Comment
Please, Sign In to add comment