Restore serverfiles on boot from backup

In the old version I could make it auto restore after a reboot of the server, is this still possible? I run my server from a ramdisk because I have more ram than I know what to do with so I want to have it set back the last backup file after a reboot.

I was definitely a big ramdisk proponent back in the day, though much of the benefits of ramdisk (imo) have tapered off due to the enormous worlds and disk-sizes the ramdisks have since then required.

Is your world small enough to really warrant this nowadays? With the huge spike in memory requirement, I figured that would have been the limiting factor (and nowadays bigger heapsizes would generally be more beneficial than improving cold block loading/generation speeds).

Nonetheless, since you asked:

  1. ramdisks are no longer a big part of the MineOS draw, so there are no built in features anymore that help facilitate auto-restorations (this could otherwise be hugely dangerous for people not using them).

  2. but the nice thing is that ramdisks have been and always will be at a layer of abstraction outside MineOS, which means no matter how little it is integrated into MineOS, it is still usable fully. This can be done through the mineos_console.js script.

So here’s what you’d have to do:

a) locate the script that starts up when your linux box engages, which is probably /etc/rc.local.
b) in that script (or in another script rc.local invokes) add:

cd /usr/games/minecraft
./mineos_console.js -s MYSERVERNAME restore 0B
./mineos_console.js -s MYSERVERNAME start

0B means ‘zero restores back’; 1B would likewise mean one restore before that.

Your ramdisk is likely mounted in /etc/fstab so it’s also assuming that the ramdisk will already be in place prior to /etc/rc.local ever being executed.

I imagine that would be it.

1 Like

Thanks, yeah I know that ram disks are a bit out of fashion but I have 72gb of ram so ram usage is not really a problem for me at all. Im going to try this tomorrow or so and see what the results will be on my server :slight_smile: