I tried following these instructions provided by a previous post relating to backing up a server using Essentials:
1)In essentials under backup put command backup.bat
/code # Backup runs a command while saving is disabled backup: # Interval in minutes interval: 60 # Add a command that backups your data, e.g. command: 'backup.bat'
2)Open a new text document on your desktop 3)Copy and paste this into the text document /code
4)Change the "NAME" to the name of you computer 5)Save the text document as backup.bat 6)Put the backup.bat into the server folder - The server folder is the folder containing the world, plugins,craftbukkit.jar,run.bat
7)In console (or in game if op) run command "backup"
- When you do command "backup" it will run the "backup.bat" creating a file called "Backup" on your desktop containing seperate folders for the world, nether, end, and plugins. In the folder it will create the backup named with the date of the backup. The backup.bat will create hourly backups and weekly backups, hourly backups older that 2 days will be deleted and weekly backups older than 2 weeks will be deleted
I followed it and triple checked that I was right and kept getting "Error: An external backup script has not been configured." on my private even knowing I followed the steps exactly.
The only reason I think for why it isn't working is it's for Essentials and not EssentialsX. Also its a 1.16.3 paper server and the EssentialsX page says it supports all versions of 1.16 but when I boot the server it comes up with another error, "[Essentials] You are running an unsupported server version!" but it doesn't affect anything unless its the backup code. Also yes I did remove the hashtag before the command line and my username is correct in the bat file.
I don't know if this code is outdated or I'm doing something wrong, help would be appreciated.
EDIT: Also some additional info I forgot to add:
I am using EssentialsX-2.18.1.0 and yes I put the backup.bat file in my main server folder the same with the run.bat and server.jar. The file works fine when I run it outside of the server (Just clicking it) and does what is intended but trying to run the command in the server cmd comes up with that error.
The script I used in my backup.bat folder backup.bat folder:
/code
I tried following these instructions provided by a previous post relating to backing up a server using Essentials:
1)In essentials under backup put command backup.bat
/code
# Backup runs a command while saving is disabled
backup:
# Interval in minutes
interval: 60
# Add a command that backups your data, e.g.
command: 'backup.bat'
2)Open a new text document on your desktop
3)Copy and paste this into the text document
/code
@ECHO OFF
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 C:\Users\NAME\Desktop\Backup\World\%itdate%D\
xcopy /e /c /h /i /v /r /y /q world_nether C:\Users\NAME\Backup\Nether\%itdate%D\
xcopy /e /c /h /i /v /r /y /q world_the_end C:\Users\NAME\Backup\The_End\%itdate%D\
xcopy /e /c /h /i /v /r /y /q plugins Backup\%itdate%D\plugins\
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
4)Change the "NAME" to the name of you computer
5)Save the text document as backup.bat
6)Put the backup.bat into the server folder
- The server folder is the folder containing the world, plugins,craftbukkit.jar,run.bat
7)In console (or in game if op) run command "backup"
- When you do command "backup" it will run the "backup.bat" creating a file called "Backup" on your desktop containing seperate folders for the world, nether, end, and plugins. In the folder it will create the backup named with the date of the backup. The backup.bat will create hourly backups and weekly backups, hourly backups older that 2 days will be deleted and weekly backups older than 2 weeks will be deleted
I followed it and triple checked that I was right and kept getting "Error: An external backup script has not been configured." on my private even knowing I followed the steps exactly.
The only reason I think for why it isn't working is it's for Essentials and not EssentialsX. Also its a 1.16.3 paper server and the EssentialsX page says it supports all versions of 1.16 but when I boot the server it comes up with another error, "[Essentials] You are running an unsupported server version!" but it doesn't affect anything unless its the backup code. Also yes I did remove the hashtag before the command line and my username is correct in the bat file.
I don't know if this code is outdated or I'm doing something wrong, help would be appreciated.
EDIT: Also some additional info I forgot to add:
I am using EssentialsX-2.18.1.0 and yes I put the backup.bat file in my main server folder the same with the run.bat and server.jar. The file works fine when I run it outside of the server (Just clicking it) and does what is intended but trying to run the command in the server cmd comes up with that error.
The script I used in my backup.bat folder backup.bat folder:
/code
@Echo OFF
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 C:\Users\Michael\Desktop\Backup\World\%itdate%D\
xcopy /e /c /h /i /v /r /y /q world_nether C:\Users\Michael\Backup\Nether\%itdate%D\
xcopy /e /c /h /i /v /r /y /q world_the_end C:\Users\Michael\Backup\The_End\%itdate%D\
xcopy /e /c /h /i /v /r /y /q plugins Backup\%itdate%D\plugins\
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
What's in my config.yml to run the backup script:
/code
# Interval in minutes.
interval: 60
# If true, the backup task will run even if there are no players online.
always-run: true
command: 'backup.bat'
Idk if u figured it out. i have the same exact problem. I just cant find essentialsX documentation on this specific command!