[ADMIN] Bukkit Linux Backup Script by Techwiz101

Discussion in 'Bukkit Tools' started by Techwiz101, Aug 10, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Techwiz101

    #!/bin/bash
    clear

    #echo ""
    #echo " @-------------------------------------------@"
    #echo " @ Techwiz101's Bukkit Backup Utility @"
    #echo " @ Version 1.0 @"
    #echo " @ @"
    #echo " @ Please feel free to improve @"
    #echo " @ this script however you desire. @"
    #echo " @ @"
    #echo " @ Backupscript@tylerbridger.com @"
    #echo " @-------------------------------------------@"
    #echo ""
    #echo ""
    #echo ""

    echo "What is your world folder called?"
    read WORLD_FOLDER_NAME

    clear
    curl http://localhost:8765/console?command=say Lag incomming
    curl http://localhost:8765/console?command=save-all

    mkdir -p Backups
    mkdir -p Backups/$WORLD_FOLDER_NAME

    zip -9 -r $WORLD_FOLDER_NAME.zip $WORLD_FOLDER_NAME
    mv $WORLD_FOLDER_NAME.zip Backups/$WORLD_FOLDER_NAME/$WORLD_FOLDER_NAME-$(date +%F)-$(date +%k%M).zip

    curl http://localhost:8765/console?command=say Save Done

    clear
    echo Saved and Backup to $SERVER_FOLDER_NAME/Backups/$WORLD_FOLDER_NAME-$(date +%F)-$(date +%k%M).zip
     
  2. Offline

    Sleaker

    I'd suggest having it use rdiff-backup rather than zips, or both. as rdiff is a lot more efficient for space.
    I'm guessing this only works with the http admin plugin?

    Also why, oh why, would you force it to reload before doing a save? Reload is extremely bad for servers.
     
  3. Offline

    Techwiz101

    Just went to check on this and I saw your comment....

    I have changed it to not reload before the save.
    Also how do I use rdiff-backup +what type of file does it make?
     
  4. Offline

    Sleaker

    rdiff-backup can be looked up on various man-page websites. rdiff is like rsync - but it stores differential backups each time, reducing the amount of space required. It doesn't save files into a zip, or 1 file as this is not efficient. The point of rdiff is that it allows easy backup retrieval to a specific time via commands, and saves massive amounts of space over zip backups.
    Also - before backing up you need to save-stop .
     
Thread Status:
Not open for further replies.

Share This Page