[ADMN/MISC] SimpleBackupTool v0.6 - The easiest way to backup your server [1240]

Discussion in 'Bukkit Tools' started by iptoux, Oct 3, 2011.

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

    iptoux

    SimpleBackupTool
    !!! works only on linux (debian) servers !!!
    after a long time of search for a good Backup plugin/tool and many time of frustration i have code my own. But now its time to share with you. This is not real an plugin, more an Script (in dev, plugin will come soon!) that will help you to backup your Server/world/plugins easy.
    There are a few simple features on board :)
    • Save multiple worlds.
    • Save plugins optional.
    • Save multiple backups.
    • Delete old backups after defined time (day/minute).
    • Full automatically**
    Special:
    • Save latest backup to Dropbox* (optional)
    * you don't need dropbox installed on your machine!

    **Requiers Essentials! (in dev, standalone will come soon!)



    Update!

    Changelog v0.6:
    • fix an very bad bug, the dropbox upload is now uploading right, there wars an error so that files not really uploaded.
    • improved the code, more infos on backup, new logical structure, rewritten dropbox python code and many other little fixes, so the script working faster!
    Download:
    - SimpleBackupTool v0.6
    - SimpleBackupTool v0.5

    Output Console:
    Show Spoiler

    [Backup] Starting world backup...
    [Backup] checking backup directory...
    [Backup] ok, backup directory found.
    [Backup] '5' backups found.
    [Backup] checking of old files (older then '10' minutes)
    [Backup] found '0' old backups.
    [Backup] delete last 0 old backups
    [Backup] delete MineCaprica_2011-10-07-21-45-34.tar.gz
    [Backup] delete MineCaprica_nether_2011-10-07-21-45-34.tar.gz
    [Backup] ---------------------------------------------------
    [Backup] checking worlds to backup.
    [Backup] found '2' worlds
    [Backup] ---------------------------------------------------
    [Backup] saving 'MineCaprica'
    [Backup] world size: 8.9M
    [Backup] backup size: 6.4M
    [Backup] done.
    [Backup] ---------------------------------------------------
    [Backup] saving 'MineCaprica_nether'
    [Backup] world size: 3.5M
    [Backup] backup size: 2.2M
    [Backup] done.
    [Backup] ---------------------------------------------------
    [Backup] saving Plugins
    [Backup] plugin size: 7.9M
    [Backup] backup size: 5.6M
    [Backup] done.
    [Backup] ---------------------------------------------------
    [Backup] -- COMPLETE! --

    with dropbox enabled:

    [Backup] dropbox upload enabled
    [Backup] uploading file: 'MineCaprica_last.tar.gz' to dropbox....
    [Backup] uploading done.
    [Backup] uploading file: 'MineCaprica_nether_last.tar.gz' to dropbox....
    [Backup] uploading done.
    [Backup] uploading file: 'plugins_last.tar.gz' to dropbox....
    [Backup] uploading done.
    [Backup] -- COMPLETE! --



    Config Settings:
    Show Spoiler


    # Set here your worlds, script is Case Sensitive!
    declare -a worlds=(world1 world2 world3)

    # backup directory
    backupdir=/home/minecraft/backup/

    # plugins
    plg=plugins

    # save plugins 1=on/2=off
    plgsave=1

    # file extension
    ext=.tar.gz

    # file seperator
    sep=_
    sep2=_last

    # use dropbox? 1=on/2=off
    dropbox=1
    dropbox_email=%YOUR_EMAIL_HERE%
    dropbox_password=%YOUR_PASSWORD_HERE%
    dropbox_dir=%YOUR_DROPBOX_TARGET_FOLDER%

    # date /time
    dateformat=$(date '+%Y-%m-%d-%H-%M-%S')

    # delete mode (mtime = days, mmin = minutes)
    delmode=mtime

    # delete time
    del=2


    Install:
    Show Spoiler

    1. Download plugin.
    - 1.a. aptitude install python-pip.
    - 1.b. pip install mechanize.
    2. Extract zip and copy all files in your server folder (not plugin folder!).
    3. Set your settings in backup.sh.
    4. open Essentials/config.yml and set near line 206:

    # Add a command that backups your data, e.g.
    command: '/home/%user%/%serverdir%/backup.sh'
    - REPLACE %VAR% with your dirs
    5. Reload/Restart server.
    6. in console type: backup.

    you can use the /backup command ingame too (admin)


    Install(Update):
    Show Spoiler

    1. Delete all old files from the plugin, also the dbupload folder and the plugin self.
    2. Dowload plugin again and extract it in your Server folder (not plugin folder!).
    3. Edit backup.sh and save.
    4. Reload/restart server, thats all. :)
     
  2. Offline

    Tolerance

    [SERV] is not an existing Bukkit category.
     
  3. Offline

    MikeA

    That's pretty nice, it's cool since you've added Dropbox upload, which is really awesome. Now if a server goes down, you have an off-site backup! Thanks.

    [diamond] [diamond] [diamond] [diamond] [diamond] [diamond] [diamond] [diamond] [diamond] [diamond]
     
  4. Offline

    Sayshal

    linux only :[
     
  5. Offline

    iptoux

    thanks :) and the nice thing is, that dropbox send the backup instantly to your computer :) and when you run this script on a root or vserver it will upload the backups fast to dropbox.

    Update!

    Changelog v0.6:

    • fix an very bad bug, the dropbox upload is now uploading right, there wars an error so that files not really uploaded.
    • improved the code, more infos on backup, new logical structure, rewritten dropbox python code and many other little fixes, so the script working faster!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  6. Offline

    halley

    Just a reminder, any backup plan is incomplete until the "restore" capability is clearly documented and tested.
     
  7. Offline

    MonsieurApple

    Scripts belong in bukkit tools. Moved.
     
Thread Status:
Not open for further replies.

Share This Page