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

Plugin breakes .zip packages #50

Closed ghost closed 12 years ago

ghost commented 12 years ago

I tried the plugin and everything was pretty awesome until i tried to use the .zips to restore griefed stuff and ou my, worldedit gave me an error when using the .zip made my your plugin so maybe have a look at that. Sorry i cant remeber the error.

It was something like "Worldedit didnt find the map from that zip or folder" If I turn off the split maps and just make folders then it works but i still would like to have compression and save space

Thank you

tgxn commented 12 years ago

Can you open them with winzip or in windows?

Its likely I've botched the naming up or Worldedit has changed.

Also, Id like to know what your: Version, Bukkit Version, and Config file looks like, thanks.

tgxn commented 12 years ago

Closing if no reply by tommorrow.

ghost commented 12 years ago

Sry, not using the plugin if its not working. Anyway yes I can open it with WinRar. Bukkit 1597, your latest version, and i think i only changed the backup name, removed years. Using minebackup

tgxn commented 12 years ago

If you change the backup name, it will make it incompatible with WorldEdit.

As you said, the plugin works fine, I am not the author of WorldEdit, so I am unable to guarantee compatibility.

You also need to make sure "splitbackup" in your config file is set to "true" for it to be compatible.

ghost commented 12 years ago

Whats the point in having those variable in the first place? Minebackup has the same system and you can change name. Add world name, year, month, day and time from hour to second. Removed year and second and it still works. Honestly i think it doesnt matter whats the name. Its important that its a .zip file but for some reason worldedit doesnt want your .zip

And i had splitbackup on true but that broke the .zip's

tgxn commented 12 years ago

"splitbackup" needs to be set to true, or it will not be compatible with WorldEdit.

It doesn't "break" the ZIP's, you yourself said they open fine in WinRAR, obviously your doing something that isnt quite right.

Also, I don't understand your suggestion as to what the point is of those variables? The point is for the maximum amount of customization, so people can have the backups work how they want them too.

How about you read the configuration file again? The only option you need to change is splitbackup.

ghost commented 12 years ago

OK, reloaded the plugin on the server and I only changed the splitback setting and worldedit is unable to use the .zip files for restore

WorldEdit Config:

#

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: -1 maximum: -1 max-radius: -1 max-super-pickaxe-size: 5 max-brush-radius: 5 disallowed-blocks:

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

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

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

snapshots: directory: D:\Minecraft\CraftBukkit 1.0.0\backups

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

scripting: timeout: 3000 dir: craftscripts

saving: dir: schematics

history: size: 15 expiration: 10

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

Backup.log file - Sat Jan 07 10:30:39 EET 2012: [Backup] Created the folder for backups.Sat Jan 07 10:34:11 EET 2012: [Backup] Found and hooked a permissions plugin.Sat Jan 07 10:35:23 EET 2012: [Backup] Found and hooked a permissions plugin.

Config.yml settings:

How often show the backup run? (Default: 15)

(Note: -1 Will disable automatic backups.)

backupinterval: 15

How many backups are retained? (Default: 25)

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

maxbackups: 25

If permissions system is not 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 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

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

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

Compatible with WorldEdit.

splitbackup: true

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. World1;World2;Nether

skipworlds:

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

Seperate by a semicolon. eg. Plugin1;Plugin2;Plugin3. This takes effect at all directory levels.

skipplugins:

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

Custom date format string that is appended to every backup.

If left empty, the default date format is used.

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

for reference.

Example: -%1$tY%1$tm%1$td-%1$tH%1$tM%1$tS (YYYYMMDD-HHMMSS: 20101201-011323) (conforms to ISO 8601)

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

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

Directory to store backup in. (Default: backups)

Note: Path can be relative, or absolute.

backuppath: backups

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

They will still get put in the server log.

broardcastmessages: 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 display error/log messages in server log (Default: true)

If true messages will only be logged to file.

displaylog: true

True to enable debug mode

@TODO Implement this.

debugmode: true

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

Internal Settings (Read: DO NOT EDIT)

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

version: 1.8.4

Server Log:

2012-01-07 10:34:28 [INFO] [Backup] Started Backup! 2012-01-07 10:34:28 [INFO] CONSOLE: Forcing save.. 2012-01-07 10:34:28 [INFO] CONSOLE: Save complete. 2012-01-07 10:34:28 [INFO] CONSOLE: Disabling level saving.. 2012-01-07 10:34:38 [INFO] CONSOLE: Enabling level saving.. 2012-01-07 10:34:38 [INFO] [Backup] Backup completed!

2012-01-07 10:35:23 [INFO] Backup v1.8.4 has completed loading!

WorldEdit Error - Snapshots for creative world: 'creative'

  1. creative/20120107-103431.zip Use /snap use [snapshot] or /snap use latest.

Position 1 Position 2

Snapshot 'creative/20120107-103431.zip' loaded; now restoring...

Errors prevented any blocks from being restored. Last error: Target world is not present in ZIP.

Some other logs - 2012-01-07 10:35:43 [INFO] WorldEdit: Using com.sk89q.worldedit.data.ZippedMcRegionChunkStore for loading snapshot 'D:\Minecraft\CraftBukkit 1.0.0\backups\creative\20120107-103431.zip'

Directory -

CraftBukkit/backups: /creative/20120107-103431.zip /survival/20120107-103431.zip /plugins/20120107-103431.zip

I think the problem is in the zip file there are no folders matching the map name but only the world files itself. Thats the problem. When i open zip i can only see the map files but not the folder itself called creative only the files. Hope this helps. Waiting for an reply