If you have a few servers sure you have found yourself with some corrupted maps. This tool is a python script that tries to fix problems in region files. It can find some typical errors (corrupted chunks, wrong located chunks, too many entities problems), and can fix these errors in various ways (deleting the chunks, replacing them with a backup copy).
This is a command line application. You have to use it in a terminal in GNU/Linux or a command line (typical MS-DOS view) in Windows. To open the command line in windows run the plication "cmd". You can find usage examples below.
Take some time to write a positive feedback or donate if you feel like so.
Questions, feature requests, problems, suggestions... If you have problems using region-fixer and want some help, please give some information in your post, for example:
- Operative system
- Python version (regionfixer only works on python3)
- Full command used to run it.
- Full error, everything, if possible, all the text visible until the next prompt. That means that you have to show even what you have written in the command line. Please conceal any sensitive information.
- Just in case you've got an old version, Region-Fixer version, use --version to see it
Suggestions and bugs should go to the github page:
Warning! This tool works, and has been tested with a lot of worlds, but bugs can be anywhere, so please, use it with care and make a backup of your world before using it! And use it at your own risk!
Can u please post a tutorial on how to use the tool? Im not familiar with python scripts and would really appreciate it u put a tutorial on how to use ur tool. Thank You sooooo much!
Can u please post a tutorial on how to use the tool? Im not familiar with python scripts and would really appreciate it u put a tutorial on how to use ur tool. Thank You sooooo much!
Sure, but what do you want exactly? How to use the tool or how to use a python script?
I want to write some examples in the readme, I'll do it in the next days.
Can u please post a tutorial on how to use the tool? Im not familiar with python scripts and would really appreciate it u put a tutorial on how to use ur tool. Thank You sooooo much!
Just updated the README with more usage information.
I am very much looking forward to using your tool, but I am having trouble getting it up and running. I am using Windows 7 64-bit. I have Python installed and running correctly. I have set my environmental variable to include python. So... I open up my command window and cd to the directory where your script is. Then I run:
python region-fixer.py --help
The output that I get is:
File "region-fixer.py", line 41
print "[ATTENTION] The directory \"<0>\" is not a minecraft world directory".format<dir>
This is obviously the first time that I have tried to run a python script, and I am sure that the solution is an easy one.. I just spent thirty minutes on Google trying to solve it... Any help would be greatly appreciated!
I am very much looking forward to using your tool, but I am having trouble getting it up and running. I am using Windows 7 64-bit. I have Python installed and running correctly. I have set my environmental variable to include python. So... I open up my command window and cd to the directory where your script is. Then I run:
python region-fixer.py --help
The output that I get is:
File "region-fixer.py", line 41
print "[ATTENTION] The directory \"<0>\" is not a minecraft world directory".format<dir>
This is obviously the first time that I have tried to run a python script, and I am sure that the solution is an easy one.. I just spent thirty minutes on Google trying to solve it... Any help would be greatly appreciated!
Thanks,
Eric
I've just tested this in a box with the same specifications as yours, and you don't need to add Python to the path, just run the command as it was an executable, Python has configured everything in the installation. So, for me, installing Python 2.7.x and running:
region-fixer.py --help
Worked perfectly, I also scanned a world and everything seems to work.
... The error message looks cropped, next time copy it full here, please. Does it says anything about "Syntax error"? If so, just change the Python version to 2.7.x (remove and reinstall), Region-Fixer doesn't work with Python 3.x
Quote from Yourdogsdead »
What version of Python should I run this under?
As I said to Eric, stick to 2.7.x, that version should work.
Thanks both for the interest, I'm going to update the info and the README adding which python version works.
Thanks Fenixin. Yes, I realized that I could run it without explicitly calling python in my execution line, I just wanted to make sure that one possible cause of error was taken away. You did solve my problem though! I am running python 3.x, so that seems to be it. I thought that I was loosing my mind... :smile.gif:
Recommend that you update the readme line, "works anywhere where python does". Thanks for the neat program!
You might want to consider adding support for the backup process as well (just a different command-line variable to automate backups)
Maybe a standard backup package like rdiff (although I don't know if it's available on Windows)
Note: MineOS+ uses rdiff already, I noticed your application from there.
Rollback Post to RevisionRollBack
"Operation grass-seed": Before and Current
(current link is updated dynamically from my MC server...)
Images are made using c10t with --limits, run every 5 minutes, images are compared to a MD5 of the previous image, only changes are kept.
You might want to consider adding support for the backup process as well (just a different command-line variable to automate backups)
Maybe a standard backup package like rdiff (although I don't know if it's available on Windows)
Note: MineOS+ uses rdiff already, I noticed your application from there.
Thanks for your suggestion, but I think is not a good idea. Every person has a different way to store backups, and there are a lot of good software for that!
Just added a windows executable! It's in the downloads section of GitHub. I'm not a windows user, but I tested in a old Windows XP 32 bits and works as expected.
I am having an issue with the program. I have a somewhat large world and when scanning with Region Fixer, it hangs on region file 27 of 57.. After pulling up the task manager, it seems there is a memory leak of sorts since the script is eating up about 4 gigs of memory at the moment.
Let me know if I need to provide any more information to help you out!
I am having an issue with the program. I have a somewhat large world and when scanning with Region Fixer, it hangs on region file 27 of 57.. After pulling up the task manager, it seems there is a memory leak of sorts since the script is eating up about 4 gigs of memory at the moment.
Let me know if I need to provide any more information to help you out!
Sorry for the late answer... I though I was watching to this topic... but not email arrived! :/
AFAIK that's not a bug, or a memory leak it's just you have a chunk with this amount of information in it. This is usually a problem of entities. Sometimes, and I don't know why this happens, the server stores in a chunk thousands of entities (I've seen a chunk 250k spiders on it! It took a few gigs loaded in memory to fix it), the entities are just copied over and over again, so, once compressed the chunk takes like 1MB, but decompressed takes GBs. You need to load this chunk in order to delete the entities and fix the chunk! If the chunk takes 4GB and 2 hours to decompress, you have to wait and give the program enough ram to load it (but you need to do this only once).
I've seen this in floating island maps, is you map like this?
Region Fixer can fix this issue using the option "--delete-entities" and "--entity-limit". Please, look at the example in the readme. This option will delete all the entities if the chunk has more than "--entity-limit" entities (the default is 1000 entities). Make sure you know what that means! (signposts are entities, chests store things as entities, mobs are entities...), but better a chunk without entities (and remember that a chunk is not a region) than a broken map.
In my map we have a store, in there are lots of chests, signs, dogs... lots of entities, and is less than 100 entities per chunk, so more than that limit may be broken entities. Play with the "--entity-limit" option!
And, as I said before, you only need to load the chunk once, because Region Fixer will fix the chunk in the scan process, so if you interrupt the process (using CTRL+C) you can start again where you left it.
Hope this is helpful. Don't hesitate to ask if you need more info!
hey,
i'm not familair with python but i have tried it for 2 hours and each time i get the same error.
maybe it's just a problem what's easy to fix.
i get this:
my imput: "$ python region-fixer /media/your/world/path"
the respons: " File "[stdin]", line 1
$ region-fixer /media/your/world/path"
^
SyntaxError: invalid syntax"
i tried to make a screen shot but i couldn't past it,
i hope you can help me
Hello!
That looks like you are in a python prompt! And you don't need to use a python prompt! Are you in windows or linux? If you are in Windows, please, see this post:
It explains the basics of region fixer for windows (and in the donwloads section of github is the executable for windows, no python needed with that).
I you are in GNU/Linux, please, open a terminal a go inside the directory where region fixer is. Then use "python region-fixer.py <path-to-your-world>", and substitute the <path-to-your-world> for the real path to your world.
I hope this helps, don't hesitate to ask if you need more help.
Also, this is the second time I see somebody trying to run region-fixer inside a python prompt... do I say anywhere in the help that this is the way to run it? Please tell me where is the text that confused you so I can change it. Thanks!
Purely from the implementing it back into MineOS side of things.
Well, it's the first time I see the checkworl.py application, and I've got no idea about MineOS, so I've got no idea of how different is it from that point of view...
...but, just checked the SK89's application and looks completely different. Checkworld checks if the information inside the chunk is realistic or readable by minecraft vanilla (It seems to fix problems with mod blocks and stuff that minecraft can't recognize). Region Fixer does what it says, it fixes region files. It reads the region files and looks for errors in the structure of region files and in the compression of the chunks. But it doesn't look inside the chunk. Well, actually it does, but just to read the location of the chunk (it's also stored inside the chunk) to check for wrong located chunks, and also to check chunks with the to many entities problem. But it doesn't make a in deep check of all the chunk data, if it can decompressed and it isn't corrupted it will be considered OK. Is more a region level check.
Also, region fixer can substitute corrupted chunks for good ones using a backup of the world, or, without backup, it can delete the them. Actually, it can fix all the bugs that can detect. (or if not fix, delete the problem)
Also, checkworld seems to be abandoned? Does it work with *.mcr files? I'm looking these urls:
Yeah, checkworld was abandoned when the region format came through sadly :sad.gif:
What we had with MineOS was a system whereby there are r-diff backups which backup the whole world, checkworld was then run to find the offending corrupted chunks, whereby our own system then found the latest 'good' backup of said chunks and restored them. How this is going to work with the region format I don't know !
If your system fully repairs the chunks without the need for backups to be moved around, it should be very simple to do a straight cut and shut !
What about rsync copies using the '--link-dest' option? For large maps is very useful.
The need for backups depends on the problem. For corrupted chunks, i.e. chunks cant be decompressed and can't be read in any way, region fixer can substitute the chunks with a backup or delete them. Delete them makes minecraft to regenerate these chunks, and if the chunk hasn't any player house or whatever the fix is perfect. But for built chunks you still need backups if you want a good 'fix'. It can do this automatically with the options '--backups' and '--fix-corrupted', you can provide a list of backups and it will search in order for a non-corrupted chunk.
For other problems things are different: wrong located chunks problem don't really need a backup, but at the moment is implemented only with backup, and entities problem doesn't need a backup at all. Look in the readme for more info. Don't hesitate to ask.
I will definitely release this as a CLI only type thing at the moment until the web-based side of things quietens down (pretty major shake-up in the works!)
I'll have a good look through the CLI arguments, just a quick one before that though -- I can specify a folder for the world and backup right ?
If it's alright with you, I will distribute this with MineOS+ for next release, purely as a CLI 'extra' for people who experience corrupted chunks.
This will scan the world in "/media/disk/corrupted-world/" and will fix the corrupted chunks using the backup directories "/media/backups/2012-12-12/" and "/media/backups/2012-12-11/".
Second question: Region Fixer is GNU/GPL v3... as MineOS, so you can distribute it with or without my permission :tongue.gif:... but thanks a lot for asking for permission! You can do it as long as you don't break the license.
If you need any feature for region fixer or need a change to fit in MineOS, ask for it, I'm not promising anything, but if it's interesting for Region Fixer, I will probably implement it.
Introduction.
If you have a few servers sure you have found yourself with some corrupted maps. This tool is a python script that tries to fix problems in region files. It can find some typical errors (corrupted chunks, wrong located chunks, too many entities problems), and can fix these errors in various ways (deleting the chunks, replacing them with a backup copy).
This is a command line application. You have to use it in a terminal in GNU/Linux or a command line (typical MS-DOS view) in Windows. To open the command line in windows run the plication "cmd". You can find usage examples below.
What does this tool do?
You can read about what this tool do in the FAQ wiki page at GitHub.
News.
To see what's new go to github
How-to download and install region-fixer
Please refer to the github install page
Usage
Please refer to the github usage page.
What does it mean that a chunk is correupted/is wrong-located/has entities problem? And what about a too-small region file?
Please see the chunks a region problems github page.
Download
You can download the source code from github:
https://github.com/F...ft-Region-Fixer or http://adf.ly/HW8ex (link with adds, use it if you want to contribute a little)
Was Region-Fixer useful for you?
Take some time to write a positive feedback or donate if you feel like so.
Questions, feature requests, problems, suggestions... If you have problems using region-fixer and want some help, please give some information in your post, for example:
- Operative system
- Python version (regionfixer only works on python3)
- Full command used to run it.
- Full error, everything, if possible, all the text visible until the next prompt. That means that you have to show even what you have written in the command line. Please conceal any sensitive information.
- Just in case you've got an old version, Region-Fixer version, use --version to see it
Suggestions and bugs should go to the github page:
https://github.com/F...ft-Region-Fixer or http://adf.ly/HW8ex (link with adds, if you want to contribute a little)
Feedback and questions should go here.
Other things Coding is one of my hobbys but I also play the guitar in an internet band. Do you like alternative music? Give us a go!
http://wearethemoonwalkers.com/
I've also made a game with some friends & family. If you like old style arcade videogames, give it a go!
http://winglesslittlepeople.itch.io/you-only-get-one-match
Warning! This tool works, and has been tested with a lot of worlds, but bugs can be anywhere, so please, use it with care and make a backup of your world before using it! And use it at your own risk!
Sure, but what do you want exactly? How to use the tool or how to use a python script?
I want to write some examples in the readme, I'll do it in the next days.
HyperCBS, I'm glad it worked! :smile.gif:
Just updated the README with more usage information.
Hope it helps!
I am very much looking forward to using your tool, but I am having trouble getting it up and running. I am using Windows 7 64-bit. I have Python installed and running correctly. I have set my environmental variable to include python. So... I open up my command window and cd to the directory where your script is. Then I run:
The output that I get is:
This is obviously the first time that I have tried to run a python script, and I am sure that the solution is an easy one.. I just spent thirty minutes on Google trying to solve it... Any help would be greatly appreciated!
Thanks,
Eric
I've just tested this in a box with the same specifications as yours, and you don't need to add Python to the path, just run the command as it was an executable, Python has configured everything in the installation. So, for me, installing Python 2.7.x and running:
Worked perfectly, I also scanned a world and everything seems to work.
... The error message looks cropped, next time copy it full here, please. Does it says anything about "Syntax error"? If so, just change the Python version to 2.7.x (remove and reinstall), Region-Fixer doesn't work with Python 3.x
As I said to Eric, stick to 2.7.x, that version should work.
Thanks both for the interest, I'm going to update the info and the README adding which python version works.
Recommend that you update the readme line, "works anywhere where python does". Thanks for the neat program!
Eric
Done! :smile.gif:
Hope it was useful for you.
You might want to consider adding support for the backup process as well (just a different command-line variable to automate backups)
Maybe a standard backup package like rdiff (although I don't know if it's available on Windows)
Note: MineOS+ uses rdiff already, I noticed your application from there.
(current link is updated dynamically from my MC server...)
Images are made using c10t with --limits, run every 5 minutes, images are compared to a MD5 of the previous image, only changes are kept.
Thanks for your suggestion, but I think is not a good idea. Every person has a different way to store backups, and there are a lot of good software for that!
Just added a windows executable! It's in the downloads section of GitHub. I'm not a windows user, but I tested in a old Windows XP 32 bits and works as expected.
Good luck!
Let me know if I need to provide any more information to help you out!
Sorry for the late answer... I though I was watching to this topic... but not email arrived! :/
AFAIK that's not a bug, or a memory leak it's just you have a chunk with this amount of information in it. This is usually a problem of entities. Sometimes, and I don't know why this happens, the server stores in a chunk thousands of entities (I've seen a chunk 250k spiders on it! It took a few gigs loaded in memory to fix it), the entities are just copied over and over again, so, once compressed the chunk takes like 1MB, but decompressed takes GBs. You need to load this chunk in order to delete the entities and fix the chunk! If the chunk takes 4GB and 2 hours to decompress, you have to wait and give the program enough ram to load it (but you need to do this only once).
I've seen this in floating island maps, is you map like this?
Region Fixer can fix this issue using the option "--delete-entities" and "--entity-limit". Please, look at the example in the readme. This option will delete all the entities if the chunk has more than "--entity-limit" entities (the default is 1000 entities). Make sure you know what that means! (signposts are entities, chests store things as entities, mobs are entities...), but better a chunk without entities (and remember that a chunk is not a region) than a broken map.
In my map we have a store, in there are lots of chests, signs, dogs... lots of entities, and is less than 100 entities per chunk, so more than that limit may be broken entities. Play with the "--entity-limit" option!
And, as I said before, you only need to load the chunk once, because Region Fixer will fix the chunk in the scan process, so if you interrupt the process (using CTRL+C) you can start again where you left it.
Hope this is helpful. Don't hesitate to ask if you need more info!
Hello!
That looks like you are in a python prompt! And you don't need to use a python prompt! Are you in windows or linux? If you are in Windows, please, see this post:
http://www.minecraftforum.net/topic/302380-tool-minecraft-region-fixer/page__st__20__p__4855777#entry4855777
It explains the basics of region fixer for windows (and in the donwloads section of github is the executable for windows, no python needed with that).
I you are in GNU/Linux, please, open a terminal a go inside the directory where region fixer is. Then use "python region-fixer.py <path-to-your-world>", and substitute the <path-to-your-world> for the real path to your world.
I hope this helps, don't hesitate to ask if you need more help.
Also, this is the second time I see somebody trying to run region-fixer inside a python prompt... do I say anywhere in the help that this is the way to run it? Please tell me where is the text that confused you so I can change it. Thanks!
Well, it's the first time I see the checkworl.py application, and I've got no idea about MineOS, so I've got no idea of how different is it from that point of view...
...but, just checked the SK89's application and looks completely different. Checkworld checks if the information inside the chunk is realistic or readable by minecraft vanilla (It seems to fix problems with mod blocks and stuff that minecraft can't recognize). Region Fixer does what it says, it fixes region files. It reads the region files and looks for errors in the structure of region files and in the compression of the chunks. But it doesn't look inside the chunk. Well, actually it does, but just to read the location of the chunk (it's also stored inside the chunk) to check for wrong located chunks, and also to check chunks with the to many entities problem. But it doesn't make a in deep check of all the chunk data, if it can decompressed and it isn't corrupted it will be considered OK. Is more a region level check.
Also, region fixer can substitute corrupted chunks for good ones using a backup of the world, or, without backup, it can delete the them. Actually, it can fix all the bugs that can detect. (or if not fix, delete the problem)
Also, checkworld seems to be abandoned? Does it work with *.mcr files? I'm looking these urls:
https://github.com/sk89q/scripts
http://www.minecraftforum.net/topic/119520-checkworldpy-corrupted-world-chunk-finder-to-be-updated/
Please, tell me if you implement in MineOS (just curious!).
Hope this helps. Please, read the readme for more information, and don't hesitate to ask.
Enjoy!
What about rsync copies using the '--link-dest' option? For large maps is very useful.
The need for backups depends on the problem. For corrupted chunks, i.e. chunks cant be decompressed and can't be read in any way, region fixer can substitute the chunks with a backup or delete them. Delete them makes minecraft to regenerate these chunks, and if the chunk hasn't any player house or whatever the fix is perfect. But for built chunks you still need backups if you want a good 'fix'. It can do this automatically with the options '--backups' and '--fix-corrupted', you can provide a list of backups and it will search in order for a non-corrupted chunk.
For other problems things are different: wrong located chunks problem don't really need a backup, but at the moment is implemented only with backup, and entities problem doesn't need a backup at all. Look in the readme for more info. Don't hesitate to ask.
First question, yes, an example:
This will scan the world in "/media/disk/corrupted-world/" and will fix the corrupted chunks using the backup directories "/media/backups/2012-12-12/" and "/media/backups/2012-12-11/".
Second question: Region Fixer is GNU/GPL v3... as MineOS, so you can distribute it with or without my permission :tongue.gif:... but thanks a lot for asking for permission! You can do it as long as you don't break the license.
If you need any feature for region fixer or need a change to fit in MineOS, ask for it, I'm not promising anything, but if it's interesting for Region Fixer, I will probably implement it.
Good luck!