I'm guessing that when you copied the backup folder, you didn't preserve permissions. The entire backup folder and it's contents need to be owned by the mscs minecraft user. The mscs settings need to point to the current backup folder location. Additionally, the backup folder names need to match the worlds they are backing up and should not be renamed.
You can reset the owner of the backup folder with this command. Be sure to replace 'minecraft' with the correct username if you changed it in the mscs settings.
chown -R minecraft:minecraft /opt/mscs/backups/
If you ever move the folder again, either move it while you are 'sudo su' as the minecraft user, or be sure to preserve the permissions.
That means there is something at the restore location, which makes sense since it's the world you are trying to restore. This looks like it might be a bug in the mscs script, this should probably go into the issue queue.
I would rename that folder and try to restore again.
cd /opt/mscs/worlds
mv Trollworld Trollworld_old
mscs restore-backup Trollworld 2015-07-25T06:50:51+02:00
Then once things look ok, you can remove the renamed world
jjchico recently made a bunch of changes to the script, and I wonder if that is the root cause of this issue. Hopefully he will have an idea of what has gone wrong. In the mean time, I recommend using the minecraft user rather than your own and using the Makefile to install the script for you by running:
What did you do to try to fix it? Did you try either of the commands I posted in comment #383? It looks like your Ubuntu install has its locale configured incorrectly, and those commands should fix the problem if I understand the problem correctly.
Maybe I'm missing it, but I don't see any unexpected error messages. The following sequence of commands should just work:
sudo make install
mscs create world 25565
editor /opt/mscs/worlds/world/eula.txt
mscs start
mscs status
For most use cases, you should be only using the mscs script. The msctl script is used when you want a different user than "minecraft" running the servers.
It does look like there may be an issue in the error message that starts with "There are no worlds to start.", it should not be telling you to run the msctl script if you ran the mscs script to begin with.
The mscs.config defaults set LOCATION="$HOME/mscs"
But, the script installer sets the minecraft user's $HOME to /opt/mscs
This was causing some problems with my fresh install because some of the script was looking for worlds in /opt/mscs/worlds while other parts were looking in /opt/mscs/mscs/worlds.
After changing the mscs.config to read
LOCATION="$HOME"
Everything worked as it should. Dunno if I botched something in the install, or if your source has this error, but it was causing problems for me and I thought I would post here in case someone else had the same problem.
I'll take a closer look at this @cagemonkey. I found a similar issue myself after @jjchico submitted the change that is probably at the root of this. Tell me a little more about how you are running the script so that I can try to replicate the problem. First, are you using the mscs or msctl command? Are you running commands as the minecraft user, root, or as your own user? Are there other changes in the mscs.config file that I might need to know about?
I'm guessing that when you copied the backup folder, you didn't preserve permissions. The entire backup folder and it's contents need to be owned by the mscs minecraft user. The mscs settings need to point to the current backup folder location. Additionally, the backup folder names need to match the worlds they are backing up and should not be renamed.
You can reset the owner of the backup folder with this command. Be sure to replace 'minecraft' with the correct username if you changed it in the mscs settings.
If you ever move the folder again, either move it while you are 'sudo su' as the minecraft user, or be sure to preserve the permissions.
Thank you very much, you solved my issue. I applied the first line you gave me, but now the script gives me this :
I maybe understand why it doesn't work, but I do not know Linux enough to solve this either
Thank you again
That means there is something at the restore location, which makes sense since it's the world you are trying to restore. This looks like it might be a bug in the mscs script, this should probably go into the issue queue.
I would rename that folder and try to restore again.
Then once things look ok, you can remove the renamed world
I would also check for a directory named `rdiff-backup-data` in your world folder.
If you see it there in the listing, remove it.
There is no rdiff-backup-data in my world folder. Is there a way to manually restore my backup?
I tried what you told me but that's what I get :
How can I add --force to my command? I tried putting it in different places but I couldn't nake it work.
There were some updates recently to the script that should fix this.
well... I think this will be my last question : How do I update my script? I think I installed it via github but I 'm not sure.
If so, were should I do :
(if this is the rigt way to do it)
And If not, how can I update it manually?
Sorry for my lack of knowledge about all of this.
I think all you need to do is go to the directory where you did the original git clone and update
Or if you removed the directory, do another git clone in a temporary directory and update.
I updated the script, and was finally able to restore my world. Thank you very much for your help
I'm not sure what's wrong =/ Let me create a GitHub issue from your error report and see if we can figure out the issue for you.
edit: Here is a link to the GitHub issue: https://github.com/sandain/MinecraftServerControlScript/issues/98
jjchico recently made a bunch of changes to the script, and I wonder if that is the root cause of this issue. Hopefully he will have an idea of what has gone wrong. In the mean time, I recommend using the minecraft user rather than your own and using the Makefile to install the script for you by running:
According to this post on the Ubuntu forums, a possible solution for you may be:
jjchico reccomends installing a couple packages:
What did you do to try to fix it? Did you try either of the commands I posted in comment #383? It looks like your Ubuntu install has its locale configured incorrectly, and those commands should fix the problem if I understand the problem correctly.
Sorry, I didn't notice your last post until now.
It looks like your minecraft user (or whatever you changed it to in the script) does not have write access to the /opt/mscs folder.
Thanks Praqoon, glad it is still working great for you!
Maybe I'm missing it, but I don't see any unexpected error messages. The following sequence of commands should just work:
sudo make install
mscs create world 25565
editor /opt/mscs/worlds/world/eula.txt
mscs start
mscs status
For most use cases, you should be only using the mscs script. The msctl script is used when you want a different user than "minecraft" running the servers.
It does look like there may be an issue in the error message that starts with "There are no worlds to start.", it should not be telling you to run the msctl script if you ran the mscs script to begin with.
I just published version 15.12.01 to fix the issue with the error message. Hopefully you have been able to get your servers working anhu42
I think I've come across a bug.
The mscs.config defaults set LOCATION="$HOME/mscs"
But, the script installer sets the minecraft user's $HOME to /opt/mscs
This was causing some problems with my fresh install because some of the script was looking for worlds in /opt/mscs/worlds while other parts were looking in /opt/mscs/mscs/worlds.
After changing the mscs.config to read
LOCATION="$HOME"
Everything worked as it should. Dunno if I botched something in the install, or if your source has this error, but it was causing problems for me and I thought I would post here in case someone else had the same problem.
I'll take a closer look at this @cagemonkey. I found a similar issue myself after @jjchico submitted the change that is probably at the root of this. Tell me a little more about how you are running the script so that I can try to replicate the problem. First, are you using the mscs or msctl command? Are you running commands as the minecraft user, root, or as your own user? Are there other changes in the mscs.config file that I might need to know about?
Hi Saindain,
Is there a way to send commands to a world server at a certain time of day in game?
thank you.
Yes, create a cron job that calls the mscs script with the commands you need.