daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 "-------------------------------------------------"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top