tgxn / Backup

A Backup plugin for the Bukkit Server API.
http://bukkitbackup.com
GNU General Public License v3.0
23 stars 14 forks source link

worldedit compatibility for individual zips #114

Closed ohjays closed 12 years ago

ohjays commented 12 years ago

As they are they wont work for me. Problem appears to be that the zip file created does not contain a subfolder with the world name. which worldedit appears to expect. Instead the world files are packed into the root directory of the zip file. Please add an option to store these files inside the worlds folder inside the zip. this makes them work with world edit for me.

ie for a world called my_world

the inside of the zip should look somewhat like this

/ my_world/ my_world/"< the worlds files>"

at the moment it looks like this / /"(the world files)"

which worldedit does not work with here when the "my_world" folder is absent ?

aciidic commented 12 years ago

Can confirm Backup isn't compatible with WE snapshots, //restore has never worked for me :(

"snapshot xxx.zip loaded now restoring..." "Errors prevents any blocks from being restored. Last error: Target world is not present in ZIP"

Was meaning to report this back in version 1.8 but forgot, surprised to see the problem still persists :(

Please fix!

aciidic commented 12 years ago

However I did just try to put the files inside backup.zip /minecraft/ dir (like OP said) and it still doesn't work.

I don't think this is the issue?

ohjays commented 12 years ago

Umm, how can you state "I don't think this is the issue?" when first you state "//restore has NEVER worked for me :("

restore WORKS FOR ME, if and only if the file follows aforementioned layout. I use it all the time. with the "backup" plugin i simple add my world folders name into the zip and move the files into that ie world "waterworld" create a waterworld folder inside the zip then shift all the the files/folders in the zip's root into this subfolder and presto happy restoring. I know this is the issue here for me ive tested it :)

aciidic commented 12 years ago

I tried your method and it didn't work for me, and why did you close the issue when it is still an issue since the plugin has not been fixed?

Like I mentioned, I did what you said, I created the folder /minecraft/ in my backup.zip and put all files into that, then tried to restore and still got the same error, thats obviously why I said I don't think it's the issue.. Maybe I did something wrong but u dont have to reply in such a tone really..

ohjays commented 12 years ago

Hmm not sure how i closed the issue, must have misclicked something duhh on my part. And sorry did not mean to offend, i was just exasperated ?. I know its finicky to set up but it's working reasonable well here. Guess im getting cranky being back on dialup till i find work :(

tgxn commented 12 years ago

CAPS RAGE!

I did fix this, and it works perfectly for me?

I'll have another look into it as soon as I can, and it will be fixed in 2.0 - I promise!

ohjays commented 12 years ago

I am running the server under Debian GNU linux of course, should not make much difference but sometimes it does ( its generally case-sensitivity issues that i run into)

tgxn commented 12 years ago

Hmm, I also run under linux, so it should be the same.

I'll investigate as sopon as i can.

tgxn commented 12 years ago

Guys, Are you using "world-container" in your bukkit configuration?

ohjays commented 12 years ago

yes "world-container: worlds" in my case

aciidic commented 12 years ago

No because my worlds are in the default directory. Does Backup require world-container to be set??

tgxn commented 12 years ago

No, It is not required.

Can you both either post your config here, or email it to me at

[yourusername].config@bukkitbackup.com

I believe I have a fix, and 2.0 will contain a significant change in the way world and plugin backups work. ;) (Mostly code hierarchy changes)

tgxn commented 12 years ago

This should be working in this build.

Can you please test: http://ci.tgxn.net/job/dev-Backup/115/

ohjays commented 12 years ago

Sorry about cfg delay im back on dialup, it sux but at with patience it mostly works :) just lotsa timeouts I installed 115 but no luck it backs up like always the final zip contain no "hubbabubba" subfolder for world "hubbabubba" unfortunately tried worldeditfix true and false and i notice a path creation error ,its creating worldshubbabubba/zipfile instead of worlds/hubbabubba/zipfile

cheers

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Configuration file for "Backup".

@author Domenic Horner (gamerx)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

======== Backup Settings ==========

How often show the backup run? (Default: "15M" / 15 Minutes)

(Note: -1 or 0 will disable automatic backups.)

Format: [Time][M-Minutes, H-Hours, D-Days, W-Weeks]

backupinterval: 120M

Should the backup stop the schedule after the first backup? (Default: false)

If enabled, one backup will be performed at the time specified under backupinterval.

norepeat: false

Option to always perform a /save-all on backup schedule. (Default: false)

If false, /save-all's are only performed when a backup is required.

alwayssaveall: false

Enable scheduled save-all? (Default: "0" / Off)

(Note: -1 or 0 disables this feature.)

Format: [Time][M-Minutes, H-Hours, D-Days, W-Weeks]

saveallinterval: 0

How many backups are retained? (Default: 25)

If this limit is hit, the oldest backup(s) will be removed.

maxbackups: 25

Should backups be performed on an empty server? (Default: false)

When the last player leaves the server, a final backup will be made. The automatic backup cycle will resume when a player re-joins.

backupemptyserver: false

If permissions system is un-available, should everyone be able to access all commands, or just ops? (Default: true)

If set to false, all players will be able to perform all commands, unless you use a permissions system.

onlyops: true

Should the bypass node be ignored? (Default: false)

If this is true, even if all players have the "backup.bypass" permissions node, the backup will still continue.

ignorebypass: true

Enables the auto-save function after the backup. (Defualt: true)

Note: If you set this to false, this plugin will backup your worlds but not save the data from the memory to your hard disc. If the server crashes between

backups, all work is lost. Disable if you use another plugin to save the world to disk (EG: autosave).

enableautosave: true

Should we backup the entire folder? (Default: false)

Use with caution, as this will be a long, large backup, it automatically ignores the backup folder, so it can still be in the server folder.

Using this will ignore "backupworlds", "backupplugins", "skipworlds", "skipplugins", and "splitbackup"

backupeverything: false

======== File & Location Settings ==========

Directory to store backup in. (Default: backups)

Note: Path can be relative, or absolute. ('D:\Backups', '/var/backups', 'altbackups', and '~/backups' are all valid)

backuppath: ../../backups/backups/

Do we use the temp folder when doing backup? (Default: true)

usetemp: true

Name for the temp folder. (Default: none)

This stores tempoary files while backup is in progress.

Note: Path can be relative, or absolute. ('D:\temp', '/tmp', 'temp', and '~/backups/temp' are all valid)

if this si not set, it defaults to a temp folder under the backups folder.

tempfoldername: temp

Whether to ZIP Backups or not. (Default: true)

If enabled, backups will be compressed and stored in a ZIP archive named with the current timestamp.

If disabled, the backup will stored in a folder with the timestamp.

zipbackup: true

Should all the worlds be split into their own files? (Default: false)

Needs to be true to be compatible with WorldEdit.

splitbackup: true

Customize the date format for each backup. (Default: '%1$tY%1$tm%1$td-%1$tH%1$tM%1$tS' [YYYYMMDD-HHMMSS])

This has to be a Java String.format string, see

http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax

dateformat: '%1$tY%1$tm%1$td-%1$tH.%1$tM-%1$tS'

WorldEdit Fixes Enabled? (Default: false)

If you are having issues with WorldEdit restores, then enable this.

worldeditfix: true

======== FTP Server Settings ==========

Should we enable FTP uploads? (Default: false)

If enabled, following options must be set.

zipbackup must be true for this to take effect.

ftpuploadenable: false

The FTP server address to connect to. (Default: none)

Can be an IP address or a hostname.

ftpserveraddress:

What port should we connect to on the server? (Default: 22)

The FTP default port is 21, if you're unsure, don't change this.

ftpserverport: 21

The username to login to the FTP server with. (Default: none)

ftpusername:

The password to login to the FTP server with. (Default: none)

ftppassword:

The directory on the FTP server you would like backups stored in. (Default: backups)

Please leave blank for the root directory.

This folder MUST exist on the FTP server, and will NOT be created!

ftpdirectory: backups

======== Content Settings ==========

What to backup. (Default: true, true)

Will give warning if either is disabled.

backupworlds: true backupplugins: true

Worlds for the backup to skip. (Default: none)

Seperate by a semicolon. eg. world;world_nether

skipworlds:

Mode for the below list. (Default: true [Exclude listed files/folders])

This can be true or false, false makes only the below plugin paths get included.

pluginlistmode: true

List of files to exclude/include from the plugin backup. (Default: none)

Seperate by a semicolon. eg. Plugin1;Plugin2;Plugin3. This takes effect inside plugins/

pluginlist: dynmap_bluedawn_tiles

======== Notification & Logging Settings ==========

Should we display messages in server/console log? (Default: true)

If false messages will only be logged to file.

displaylog: true

Should we log the plugins logs to the file. (Default: false)

File is specified in "backuplogname".

logtofile: true

Backup log file name. (Default: backup.log)

Filename for log file, it is stored under the plugins data folder.

backuplogname: backup.log

Should we send messages in-game on backup complete. (Default: true)

False will only notify players with the "backup.notify" permission.

notifyallplayers: true

Enable online version checking? (Default: true)

Requires internet connectivity.

enableversioncheck: false

###############################################

Internal Settings (Read: DO NOT EDIT)

###############################################

requiredstrings: str-100 version: 2.0-dev

tgxn commented 12 years ago

Alright, the issue is that I forgot the file seperatorn ill fix it in the next dev build for you

tgxn commented 12 years ago

Please confirm this build works:

http://ci.tgxn.net/job/dev-Backup/118/

tgxn commented 12 years ago

@webname Can you please let me know if this resolves this issue?

Once this is working, I can push a new release. :)

Thanks

aciidic commented 12 years ago

http://ci.tgxn.net/job/dev-Backup/118/ Worldeditfix does not work for me.

ohjays commented 12 years ago

Sorry , my dialup isnt the best, getting used to failing on 100KB plus downloads now will try build 120, also have sisters kids over and only one phone line

ohjays commented 12 years ago

Right, reconfigged the config etc, ran backup ( path error is fixed ). But inside the zip it still does not have the worlds files inside a subfolder representing that world ie i open the zip and see zip: uid.dat level.dat (etc) region\ region(etc)

should be zip: hubbabubba\uid.dat hubbabubba\level.dat hubbabubba(etc) hubbabubba\region\ hubbabubba\region(etc)

this is for a world hubbabubba, so no go here :(

aciidic commented 12 years ago

I'm getting spammed with emails from this thread, stop reopening it >:(

tgxn commented 12 years ago

@webname Okay, I have attempted this, and it doesn't work for me, so I'll re-test it tonight. I've done another couple of fixes in the code when looking at this issue, so hopefully there won't be any bugs!

Sorry @aciidic, There's a "Disable Notifications" link at the bottom. -> Notifications for new comments on this Issue are on. Disable notifications for this Issue -> https://github.com/gamerx/Backup/issues/114/unsubscribe

And, remember to subscribe to notifications @ mailing.bukkitbackup.com!

tgxn commented 12 years ago

Alright, I'm pretty sure I've nailed this one.

I'll attempt a few more tests, and push into dev later tonight. :)

tgxn commented 12 years ago

Okay It's working for default settings.

I think WorldEdit is just not going to work with split backups.

I'll do further investigation as part of 2.1, if ti works as default, that's fine with me.

ohjays commented 12 years ago

?? Just installed dev 121 and its now creating the worlds subfolder inside the zip for each individual worlds zip file, i drop it into my worldedit backup folder for this world , bashed some blocks, selected your backup for restore and presto happy worldedit looks good , well done. Im not sure what you mean split backups not working they are here ???. its what im using, am i missing something ?

splitbackup: true

also

Name for the temp folder. (Default: none)

This stores tempoary files while backup is in progress.

Note: Path can be relative, or absolute. ('D:\temp', '/tmp', 'temp', and '~/backups/temp' are all valid)

if this si not set, it defaults to a temp folder under the backups folder.

Needs to be false to be compatible with WorldEdit.

tempfoldername: temp

works with it set to temp ??

dont know why its munging the fonts must have cut/pasted something that does not show sorry :(

tgxn commented 12 years ago

Alright. ill need to make some amendments. what worldedit config are you using?

tgxn commented 12 years ago

http://ci.tgxn.net/job/dev-Backup/122/

Should amend any issues you may have had.

Please let me know if there are any issues you can see with this!

ohjays commented 12 years ago

Sorry about slow response, friggin dialup is killing the internet :) using dev builds of worldedit

wordedit\config.yml as follows

#

WorldEdit's configuration file

#

About editing this file:

- DO NOT USE TABS. You MUST use spaces or Bukkit will complain. If

you use an editor like Notepad++ (recommended for Windows users), you

must configure it to "replace tabs with spaces." In Notepad++, this can

be changed in Settings > Preferences > Language Menu.

- Don't get rid of the indents. They are indented so some entries are

in categories (like "max-blocks-changed" is in the "limits"

category.

- If you want to check the format of this file before putting it

into WorldEdit, paste it into http://yaml-online-parser.appspot.com/

and see if it gives "ERROR:".

- Lines starting with # are commentsand so they are ignored.

#

limits: max-blocks-changed: default: 1000000 maximum: 50000 max-radius: 50 max-super-pickaxe-size: 5 max-brush-radius: 20 disallowed-blocks: [6, 7, 14, 15, 16, 26, 27, 28, 29, 39, 31, 32, 33, 34, 36, 37, 38, 39, 40, 46, 50, 51, 56, 59, 69, 73, 74, 75, 76, 77, 81, 83]

use-inventory: enable: true allow-override: true

logging: log-commands: true file: worldedit.log

super-pickaxe: drop-items: true many-drop-items: true

snapshots: directory: "../../backups/worldedit/snapshots"

navigation-wand: item: 345 max-distance: 100

scripting: timeout: 3000 dir: craftscripts

saving: dir: schematics

history: size: 20 expiration: 60

wand-item: 271 shell-save-type: bash no-double-slash: false no-op-permissions: false debug: true