Szum123321 / textile_backup

Backup Mod for Fabric
https://www.curseforge.com/minecraft/mc-mods/textile-backup
GNU General Public License v3.0
90 stars 30 forks source link

Restore Backup and Restart? #37

Open Huntooon opened 4 years ago

Huntooon commented 4 years ago

When restoring a backup the server shuts down, the backup is restored but the server does not start up again. I use a shell script to launch the server automatically on a stop or crash. Is there any way I can modify this script or the mod to auto-restart after a backup restore? I'm quite sure this is standard but I will paste the script below. Any help would be greatly appreciated :)

#!/bin/bash
while true; do
java -server -Xmx10G -XX:MaxPermSize=10240M -jar creative.jar
echo "You have 5 seconds to stop the server using Ctrl-C. Server will restart otherwise"
sleep 5
done
Szum123321 commented 4 years ago

If I understand you correctly, you would like this script to restart server only after backup restore, right?

Huntooon commented 4 years ago

I would like the script to restart the server every time it stops, but including backup restore too. Because I have the issue that I restore the backup using the mod but the server does not get started again. Does that make sense?

Szum123321 commented 4 years ago

Oh. I'll see what can be done.

Szum123321 commented 4 years ago

I'm sorry but for me it all works well. One thing I don't understand is what that -server options is.

Huntooon commented 4 years ago

what sort of script do you have running that allows your server to restart on a crash, or /stop command?

Huntooon commented 4 years ago

Okay so If i launch my server, then do not take any backups and stop the server with /stop then the script I posted above works, and the server restarts automatically. However, if a backup has occurred, whether with /backup start or an automatic one, The server will shut down with /stop but will get stuck on [Server thread/INFO]: Thread Query Listener stopped aka the last line when the server shuts down. so for some reason the script start.sh that I posted does not recognize it when the server stops after it has taken a backup at any point. I have backup on shutdown off as well.

Huntooon commented 3 years ago
Screen Shot 2021-01-17 at 12 43 45 PM

Here is an example of this issue. after the backup is taken, if you do /stop the server gets stuck here.

It should do this:

Screen Shot 2021-01-17 at 12 46 33 PM

I did not take a backup before doing /stop in the second picture.

whes1015 commented 2 years ago

When restoring a backup the server shuts down, the backup is restored but the server does not start up again. I use a shell script to launch the server automatically on a stop or crash. Is there any way I can modify this script or the mod to auto-restart after a backup restore? I'm quite sure this is standard but I will paste the script below. Any help would be greatly appreciated :)

#!/bin/bash
while true; do
java -server -Xmx10G -XX:MaxPermSize=10240M -jar creative.jar
echo "You have 5 seconds to stop the server using Ctrl-C. Server will restart otherwise"
sleep 5
done

try Fabric_BackUp this is a fork from this mod