Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Minecraft ramdisk restore
- BASEDIR=/home/minecraft/
- ORIGDIR=${BASEDIR}mountPoint
- BACKUPDIR=${BASEDIR}backups/latest/
- mount ${ORIGDIR}
- if [ $? = 0 ]; then
- echo "-------------------------------------------------"
- echo "Success to mount Ramdisk on ${ORIGDIR}"
- echo "-------------------------------------------------"
- else
- echo "-------------------------------------------------"
- echo "Failed to mount Ramdisk !!"
- echo "-------------------------------------------------"
- exit 1
- fi
- rsync -rl0tcv ${BACKUPDIR} ${ORIGDIR} > ${BASEDIR}rsyncr.log
- if [ $? = 0 ]; then
- echo "-------------------------------------------------"
- echo "Success to restore latest files to ${ORIGDIR}"
- echo "-------------------------------------------------"
- else
- echo "-------------------------------------------------"
- echo "Failed to restore latest files to ${ORIGDIR}!!"
- echo "-------------------------------------------------"
- exit 1
- fi
- echo "-------------------------------------------------"
- df
- echo "-------------------------------------------------"
- ls -l ${ORIGDIR}
- echo "-------------------------------------------------"
Add Comment
Please, Sign In to add comment