Hi everyone, Iāve been using MineOS for around a week so far, Iāve been extremely impressed with it - itās astonishing to see a Linux distribution and server application package thatās so easy to install and configure.
I hit my first problem yesterday, which was probably mainly user error (and ignorance) but the UI didnāt prevent me from making a big mistake. I have hourly automatic Restore points created and I wanted to test it out so that I could use it with confidence if I needed to in future.
Here are the steps I took (times are rough guesses):
07:00 Started playing Minecraft 08:50 Decided to try the Restore function 09:10 Quit Minecraft and with the Server still running (perhaps this was my mistake?) I clicked on the 09:00 Restore point.
There doesnāt appear to be any feedback to the user when the button is pressed. Iām still not entirely sure what action is taken.
09:15 Connected to the server again (I have not restarted the server at all) and played for the next three hours 12:15 Stopped playing and quit Minecraft 12:20 I decided to restart the server as the memory usage was getting high and I wondered if that would reduce. 12:25 Connected to the server again to check all was okay - Iād lost the last three hours of changes to the world!! The world was as it was at 09:00.
I tried using the restore points at 12:00, 11:00 and 10:00 - they were all the same as 09:00.
This seems like a big vulnerability to me. Iām still not entirely sure what the procedure should be. Iām guessing I should have stopped the server, clicked a restore point and then started again? Perhaps the Restore buttons should be disabled unless the server is stopped. Also it would be good to have a āAre you sure?ā prompt and some kind of feedback to the user that an action has taken place.
Hi.
An active server has all the changed files in memory, and the backup function backups data written to disc. The server writes to disc when a player exits, a player (with the proper ridghts) uses the āsave-allā command, or when you use command āstopā (the same as using the stop button in MineOS). MineOS Node has a function fr periodic saves, unless you left that field blank, where MineOS do not force a save-all.
Now let me break this down for you to see if we can discover where the potential fault happened:
07:00 create restore from saved data
07:00 start playing
08:00 create restore from saved data
09:00 create restore from saved data
09:10 exit server, trigger āsave-allā by player exit
09:10 click ārestoreā using the 09:00 point (this overwriting the 09:10 saved files)
09:15 start playin
10:00 create restore from saved data
11:00 create restore from saved data
12:00 create restore from saved data
12:15 exit server. trigger āsave-allā by player exit
12:20 restart server
12:25 connect to server, find 09:00 world.
after this tried restoring using 10, 11 and 12 points.
Ok as you can see, the 10, 11, and 12 points may not have been different from the 09:00, since you where actively playing, and the server had not actually saved the world data to disc and just keeping it in memory. you had a written data at 09:10, but this got overwritten by the restore of the 0900 point.
It is difficult to explain why the server reset itself after a restart. It would help to know which version of MineOS you are running. There are two main versions available now: MineOS python, and MineOS Node. the python version is really defunct, and the node version is recommended. There is a new version under dev, but is has not been released yet.
If I remember correctly it was possible to select a feature called ārestore on bootā in older versions of MineOS. In the node version this is removed as it is really not a good function, and it is confusing. It actually ran the restore function from the latest restorepoint. Older versions did not have the āsave-all at intervalsā function. This is what I want to figure out. If your server is of an older version with the ārestore on bootā and āsave all at intervalsā functions, this can explain why your server reset itself to the 09:00 point. If not there is something else going onā¦
Hi, thanks for your helpful and informative reply, I appreciate your time.
Firstly, what version am I using? - I downloaded the latest MineOS Turnkey distribution using the link in the Wiki - āCurrent 64-bit ISO downloadā based on Debian āJessieā. Iām struggling to find a mention of version number from the WebUI until I clicked on the user name at the top and selected āgit commit:d9a604bā, which took me to a page on github.com hexparrot/mineos-node ābumped express to 4.14.xā on Oct 13 2016. Hopefully that confirms that this is MineOS Node?
Your breakdown looks correct. I was pondering over the āsave-allā setting. In the server status window there is a ā60ā in the āSave-allā box, but Iām not able to change this value. I definitely want to be sure that a restore point is created after a save has been performed. I have changed my archiving time from every 4 hours to 1 hour until I can be confident that this doesnāt happen again (I am performing the save-all and archive function). I have archives for 8am and 12pm and sadly the 12pm version was showing 9am state too.
Just to be clear, I didnāt reboot the machine, the only thing that was restarted was the Minecraft Server using the red Stop button -> Restart. I havenāt changed any ārestore on bootā settings, but then it sounds like the version I have doesnāt have this feature anyway.
Hopefully these details can start to narrow things down a little?
That probably not be the solution to your error, that is just a sidepoint. It do however clear out a host of other bugs
@hexparrot (creator of MineOS) may have to correct me if I am wrong, but I think that the greyed out ā60ā in the āsave-allā setting is to be considered an example and a suggestion. For it to actually be set, you must write a number there. I suggest something around 60 for it to match your backup timer.
In your minecraft server directory there is a configuration file that contains all information MineOS uses to control your minecraft server:
In this file you will find a few settings that may not be instantly obvious or available in the WebUI
Please check this file to see if the following settings are there, and what they are set to:
[onreboot]
restore=false
start=true
It is not certain that the setting ārestore=ā is there, but if it is make sure it is set to āfalseā.
You should also see a ācommit_intervalā, this is the āsave-allā setting.
Another thing to check (one of the āIām not stupid you knowā things;D) is if the disks on your MineOS server is full or not. Minecraft will happily continue to let you play and create even though the disks are full, but it will discard all new changes from memory when you stop the server, if it canāt write them to disk (I lost about a month of minecraft that way. My players where not happyā¦)
Stupid question, but how do I determine what version of MineOS Iām running? Thanks for the link with the details on performing the update - I followed this and to my eyes it looks like I was already at the latest version (unless Iām misinterpreting the output - copied below)?
To me it looks like the current version was v1.1.7 and the latest version that will be installed is also v1.1.7 but Iām not very familiar with any of this!
I had a look in server.config and there is no ārestoreā parameter listed. Also, there is no ācommit_intervalā parameter listed. Should this be added? Whatās the correct syntax to achieve this?
The disk is definitely not full - itās reporting 5.5% usage. What a nightmare for you losing a month of Minecraft!! Wow so sorry to hear that. Iāll definitely keep an eye on the disk usage!
I think Iāll need to see if I can recreate this bug in a repeatable way on a test world/server. Iām still not happy with how the restore feature works. Is there any documentation on the correct procedure?
You are doing the version detection right.
You are on the node version, and the current version is the git release when you pull down the āuserā menu in th etop corner. The lates version is 7 days old and is git:1190870, which is the one you just upgraded to (MineOSās GIT-hub: https://github.com/hexparrot/mineos-node)
That the ārestoreā parameter is missing is good. This means that you rserver should not restore on reboot. If you want to be sure you can add the following line under [onreboot]:
restore=false
To define the commit interval it should really just be enough to add the wanted number of minutes in the box in the WebUI. If you want to do it manually you may add the following line under [minecraft]:
commit_interval=60
the number is the number of minutes the interval spans. You can put whatever number you like, and that fits your backup plans there
To be honest, I use the archive function daily instead of the backup function:D This means I never really got into the spesific problem you experienced.
MineOS uses rsync to do its backups, and gzip to make archives. I think that by forcing an hourly save your will head off that problem.
@hexparrot:
Would it be an idea that the backup function forced a save-all before running the backup?
Thanks again. When I check the version number now it still takes me to the same GitHub page (git: d9a604b). Is it necessary for me to restart after installing the update?
The weird thing about the āSave-allā box in the GUI is that itās disabled (read only) and so I canāt change the value from 60.
Thanks. I liked the idea of incremental backups to save on disk space, but itās a 120GB SSD and if I keep on top of pruning the archives then I agree that itās probably a better option for me!
The scheduled backup feature that I have selected does a āsave-allā first and Iāve seen this pop up whilst playing and in the logs.
Yep, you have to restart the MineOS webui for the update to take hold. simply run the following command as root: service mineos restart
This restarts only the WebUI, and leaves your minecraft servers running
You also have to refresh your browser to make sure it has loaded a fresh copy and not running of a cached copy.
You are right. That is weird. In my installation the 60 is greyed out, but I may overwrite it with my wanted save-all interval (usually 60), which makes it black. I always think of the grey 60 as a reccomendation and exampel more than an actual value. But that you cant even add a number there is weird. try again after restarting the WebUI? Or simply try just clikcing in the frame and enter a new value?
Hm. If it saves first, and you saw it pop up ingame, and you still experienced that the savepoint was lagging behind on an old timepoint there is something else wrong. That error would mean that minecraft is not actually writing to disc when it tries a save-all, since MineOSās backup function backs up written data (using rsync).
Possible explanations:
full disk (you have chekced this, and you are far from full).
a problem with rights, minecraft do not have the rights to write to disk. This usually happens if you use one user to create the server, and another to manage it, and they are not in the same user group, or have the right to use each others files and folders. The biggest NONO is to use the root user to do anything in the WebUI or in shell (other than updates of system and WebUI, and restarts of those two). Using root to create minecraft servers gives really weird behaviour, including loss of dataā¦
a bug or error in the minecraft jar. This error we cannot do anything about until Mojang (or the ones making your chosen minecraft server version) releases a new version hopefully fixing this error.
Thanks for the service restart command! I havenāt done it yetā¦
ā¦firstly I tried again to change the āsave-allā parameter and I can overwrite it! Iām so sure I couldnāt do that before. Oh well, never mind. Thanks for making me look again!
Sorry, Iām muddying the waters here. When I had the problem occur it was the restore points that were not behaving. At that time I was performing an Archive every 4 hours and I didnāt choose the āsave worldā version of this for some reason. I have subsequently chosen this and I have it archiving every hour.
Oh yes, guess what? I am using ārootā to do everything! It was a mistake I made at the beginning when I first logged in and I didnāt realise there was a āmcā user. Iāve been meaning to rectify this based on the recommendations in various documentation but Iāve not got around to doing that yet. I didnāt realise it could have such severe consequences!
Iām learning from my mistakes and thanks for your guidance. I will delete the server and create it again as the āmcā user.
Iāve also acquired a new server, which Iām currently installing Debian on. Iām going to try installing MineOS on this and further my education. I think doing it from scratch might inform me better than using the simple Turnkey solution.
imho the distinction is important to your conversation.
i hate to interupt and correct me if iām wrong but the āMinutes between committing world to disk via āsave-allā (empty to disable)ā save-all function describes /var/games/minecraft/servers/[servername]/backups, are saved as 2017-01-04-09-11-06.zip and inside is a āworldā save. it can be set to every hour.
restore is a whole server backup including any save archives in /var/games/minecraft/backup, can not be set to every hour and is to be performed manually (except via cron script).
@tNt:
Both backup and archive only handles written data. Both need a āsave-allā to get the most resent changes.
Backup uses rsync to take a backup of all new and changed files, leaving unchanged files alone. This gives a smaller footprint of each savepoint. Backups are stored in /var/games/minecraft/backup.
Read more about rsync here: https://www.linode.com/docs/tools-reference/tools/introduction-to-rsync
Archive uses gzip (tar) to create something called a ātarballā containing all the files in a server directory. Since each archive contains the entire server directory, they grow rather big as the world grows. Archives are stored in /var/games/minecraft/archives.
Read more about gzip and tar here: https://www.howtogeek.com/248780/how-to-compress-and-extract-files-using-the-tar-command-on-linux/.
Both use compression to minimize disk usage, but as I said, since minecraft usually handles all gaming and changes to the world in memory, both need a save-all to be able to get all the latest changes. If a save-all is not done, only changes written to disk is archived or backed up.
You are for the most part running FTB-style servers (if my memory serves me correctly). They come with all sorts of mods, including auto backups. Those backups are stored in the minecraft server directory and not hanlded by MineOS.
Mineos is pretty clear in how it handles it files:
in /var/games/minecraft/ there are the following direcotries:
archive : Containint all archive copies created by MineOS
backup : Containing all backups created by MineOS
import : directory you place the minecraft server archive files you wish to import as a new server
profiles : repository for all profiles you have downloaded
servers : Where MineOS places all active minecraft servers and their files.
Archive, backup and server is sorted in subdirectories named by each minecraft server then have files from.
So if a server has a plugin or mod that creates its own backups, they are placed in the āservers/[servername]/backupā directory, not the ābackup/[servername]ā or āarchive/[servername]ā direcotries