Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble with snapshots #23

Closed
rbos opened this issue Oct 21, 2010 · 7 comments
Closed

trouble with snapshots #23

rbos opened this issue Oct 21, 2010 · 7 comments
Labels
type:bug Incorrect behavior, not working as intended

Comments

@rbos
Copy link

rbos commented Oct 21, 2010

I'm generating a snapshot file with 7zip -

7z a -tzip -xr!imgcache -xr!public_html/map -mx0 $backupdir/$filename . > /dev/null

and seeing the filename, subsequently, in-game with /listsnapshots,

but when I do //use latest, and //restore, I get

"Failed to load snapshot: invalid CEN header"

The zip file is valid (unzip can list the files and extract from it) as far as I can tell.

Maybe if I try a different compression level..

@rbos
Copy link
Author

rbos commented Oct 21, 2010

no dice with -mx1. I should try it with regular zip I guess.

@rbos
Copy link
Author

rbos commented Oct 21, 2010

When I try to //use today-01:18.zip, it says "That snapshot does not exist or is not available" in-game.

When I rename it to 'tester.zip' (this one made with the regular zip utility, not 7zip), I get "invalid CEN header" again.

I'm running on Debian, here's my worldedit.properties:

#Minecraft Properties File
#Wed Oct 20 20:40:03 PDT 2010
snapshots-dir=/attached/minecraft-backups
allowed-blocks=0,1,2,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,35,41,42,43,44,45,47,48,49,52,53,54,56,57,58,60,61,62,67,73,78,79,80,81,82,85
map-script-commands=true
max-blocks-changed=-1

I'm going to bed. If you guys have any input for tomorrow that'd be great.

@sk89q
Copy link
Member

sk89q commented Oct 21, 2010

How big is the ZIP file? Regardless, I just searched around and it appears that Java's Zip implementation has some major flaws that may be contributing to your problem. I think I'll be replacing Java's Zip implementation with a 3rd-party's by the next release. Hopefully that will resolve your issue.

As for the "snapshot does not exist or is not available," it's due to the bit zealous check on the list of allowed characters in a filename. (":" isn't currently an allowed character.) I'll see if I can make it more lenient in the next version.

@rbos
Copy link
Author

rbos commented Oct 21, 2010

Thanks for the response, the zip file is about 1.3 gigabytes.

Good catch on the allowed characters. I'm okay with overzealous filename rules, as long as the rules are documented. :)

Really looking forward to getting this working, selective rollbacks without a server restart will be fantastic!

@sk89q
Copy link
Member

sk89q commented Oct 21, 2010

Try this:
http://sk89q.com/tempxfer/worldedit-eebe6e.zip

You need to download TrueZIP:
http://repo1.maven.org/maven2/de/schlichtherle/truezip/6.8.1/truezip-6.8.1.jar
Put it in plugins/ as "truezip.jar".

There's nothing indicating that TrueZIP is being used though (it falls back to Java's ZIP library), so the real test is whether your ZIP files open. :)

@rbos
Copy link
Author

rbos commented Oct 22, 2010

Seems to work now. :D

@sk89q
Copy link
Member

sk89q commented Oct 22, 2010

Good to hear!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Incorrect behavior, not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants