Help with Essentials Backup

Discussion in 'Spigot Plugin Development' started by floory565, Jun 8, 2016.

  1. floory565


    Hi all,

    Essentials allows you to backup server folders:

    The suggested code for the batch file used to back folders on a Windows computer is:
    Code (Text):
    SET itdate=%date:~-10%
    SET itdate=%itdate:~6,4%-%itdate:~3,2%-%itdate:~0,2%
    echo Current date: %itdate%
    xcopy /e /c /h /i /v /r /y /q world Backup\%itdate%D\
    SET hour=%time:~0,2%
    IF "%hour:~0,1%" == " " SET hour=0%hour:~1,1%
    xcopy /e /c /h /i /v /r /y /q Backup\%itdate%D Backup\%itdate%-%hour%H\
    echo Backup Complete (assuming no errors above).  Attempting to remove old files..
    forfiles /p "Backup" /m "*H" /c "cmd /c rmdir /s /q @path" /d -2
    forfiles /p "Backup" /m "*D" /c "cmd /c rmdir /s /q @path" /d -14
    The line:
    Code (Text):
    xcopy /e /c /h /i /v /r /y /q world Backup\%itdate%D\
    specifies the folder 'world' to be backed up.

    How would I alter the folder path to instead backup the entire server folder? And how would I alter the resulting path to save the backup as a .zip?

    Thanks in advance!
  2. probably a better idea dor this to be in the Spigot Plugin help forum, but i will answer it anyway.

    1. are you sure your world name is 'world'
    2. have you tried running the raw .bat file?
    3. is the bat setup as teh backup script for the command?
  3. floory565


    Thanks for the suggestion about switching forums.

    I'm not having a problem with the backup process. As I stated in my original post:
    Thanks for pitching in though!
  4. well... ill bold file paths

    xcopy /e /c /h /i /v /r /y /q world Backup\%itdate%D\

    xcopy /e /c /h /i /v /r /y /q Backup\%itdate%D Backup\%itdate%-%hour%H\

    Assuming you have 7 zip on the host machine:

    otherwise searching up how to zip a folder in a bacth file on google should help you out ;)

    EDIT: You cant use essentials to backup the entire server folder i believe, thats what Multicrafts backup feature is for (unless you cant afford multicraft)
  5. floory565


    Alright thanks for your help! I've found a resource that backs up the entire folder ( - the only problem is that it isn't as configurable as Essentials backup.