[INACTIVE][ADMN] SimpleSave v3.25 Simple automatic saving! [000] - Backups!

Discussion in 'Inactive/Unsupported Plugins' started by desmin88, Mar 11, 2011.

  1. Offline

    desmin88

  2. Offline

    BigRenegade

    @desmin88
    I think I found the reason the the name of the world is getting truncated to orld.
    in your Backup class you have the following line:

    String backupDir = "backups".concat(FILE_SEPARATOR).concat(world.getName());

    with it you have it checking for a backups folder. However, in the config it reads:

    backup.directory=backup

    My assumption is that because it is looking for the folder backups and finds backup it is truncating the first letter of the world name to compensate for the s in backups. I may very well be wrong and this a possible waste of time, but i do know a bit about programming in other languages and this would seem to be a possible problem.
     
  3. Offline

    desmin88

    @BigRenegade
    The source download hasn't been updated in the original post. I don't want to release the new stuff yet, because it will offer no help to people wanting to learn, as it is very messy.
    In 2.2.1's code, its actually this
    Code:
            String backupDir = this.plugin.ConfigArray[16].concat(FileUtils.FILE_SEPARATOR).concat(world.getName());
    
            world.save();
    
            FileUtils.copyDirectory(new File(world.getName()), new File(backupDir));
    
            String targetName = world.getName();
            String targetDir = this.plugin.ConfigArray[16].concat(FileUtils.FILE_SEPARATOR);
    
            if (backupName != null) {
              targetName = world.getName();
              targetDir = targetDir.concat(FileUtils.FILE_SEPARATOR);
            }
            FileUtils.zipDirectory(backupDir, targetDir.concat(targetName).concat(getDate()));
    
            FileUtils.deleteDirectory(new File(backupDir));
     
  4. Offline

    BigRenegade

    i just spent the past hour running tests on a theory I had and it seems i was partly right. I found that if I place \\ in front of the back folder: i.e. \\backup then when it backs up the world folder then everything comes out fine. The world name inside the zip is world. So, having found that out I'm going to try using backup.directory=\\minecraft\\backup and see if that works. Will post back on my findings.
     
  5. Offline

    desmin88

    @BigRenegade
    Your trying to say that I should make the default directory be \\backup?
    That just means root\\backup.
     
  6. Offline

    BigRenegade

    if you use \\backup it will stick it in the root drive like this: d:\backup. What I'm testing now is to see if the variable is set to \\Minecraft\\backup then it should place it in the cbroot (being minecraft) and then the backup, as such: \\Minecraft\\backup. I will know shortly if this way of setting the folder works and stops it truncate the world name from World to orld.
     
  7. Offline

    desmin88

    @BigRenegade
    Okay, cool. I hate file directories and such.
     
  8. Offline

    BigRenegade

    Well, that idea worked partially so I'm trying a different way of doing it. I'll keep at it till I figure it out. I'm just stubborn like that. :D

    I enjoy this little plug-in. It's the best autosave plug-in around: fast, efficient, and causes no lag on my server. If I can help get a bug fixed you can believe I will do so.
     
  9. Offline

    silentdojo

    How would I use the backup directory for linux.
    I want the backup folder to go above 2 directories.
    My filesyste:
    /bin/plugins/
    /backup
    I want the backup to go in /backup not /bin/backup
     
  10. Offline

    BigRenegade

    I wish I knew how java did file directories. This is driving me crazy. I've tried every variation I can think of to get it to save the zip in the backup directory with just the world name (in my case world) in the zip. I can get clost but I have yet to find the magic combination. The closest I've been able to get is using \\Minecraft\\backup. But for some reason it will take the last 2 letters of Minecraft (ft) and create a directory structure inside the zip like ft\backup\world. I'm going to keep trying and see what i can find out about java fileio in the mean time.


    Are you looking to put it in the root folder? if so then all you would need to do in the config is set the backup directory to \\backup. That puts it in (root)\backup. (or possibly use //backup as I am not all that familiar with Linux settings to specify a directory)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016
  11. Offline

    silentdojo

    yeah i was hoping someone familiar with linux new the exact answer but i'll give a few things a try and let you know what it should be.
     
  12. Offline

    BigRenegade

    @desmin88

    I tested a bunch of ways to set that directory which would create a zip file with only the world folder name in it and the only way I could get it to work right was to use \\backup so that it put the backup folder in the root drive (my case D:\backup). This gave me a zip file with the naming you have set in the plug-in with only the zipped world folder inside. Any other way and the zip folder structure was messed up. It would still save the world folder but the folder structure in the zip could be a nightmare.

    If I were more familiar with using Eclipse and the java language I might just be able to find the root cause of the problem. But I have no idea on how to load the source code you provide into Eclipse so that I can edit it and save it back out. I hope my tests have helped you in some small way to correct this small bug which has generated a few complaints.

    regards,
    Renegade
     
  13. Offline

    maystorm

    They will really never conflict? In your example (14/60 minutes) there is a conflict after 420 minutes: the 30th save and the 7th backup will take place at the same time. Regardless of the combination, at some point they will always conflict.
     
  14. Offline

    vein_mx

    would it be possible for the dates to go YYYYMMDD instead of the current DDMMYY?
     
  15. Offline

    desmin88

  16. Offline

    Deadly_Paradox

    Is there a way to disable the ConsoleCommandSender messages this plug-in sends (like all other save plug-ins)?

    Code:
    2011-05-06 18:23:16 [INFO] [Server] Backing up the world!
    2011-05-06 18:23:16 [INFO] Forcing save..
    2011-05-06 18:23:16 [INFO] ConsoleCommandSender: Forcing save..
    2011-05-06 18:23:16 [INFO] Saving chunks
    2011-05-06 18:23:16 [INFO] Save complete.
    2011-05-06 18:23:16 [INFO] ConsoleCommandSender: Save complete.
    2011-05-06 18:23:16 [INFO] Disabling level saving..
    2011-05-06 18:23:16 [INFO] ConsoleCommandSender: Disabling level saving..
    2011-05-06 18:23:18 [INFO] Enabling level saving..
    2011-05-06 18:23:18 [INFO] ConsoleCommandSender: Enabling level saving..
    2011-05-06 18:23:18 [INFO] [Server] Back up finished!
     
  17. Offline

    ssechaud

    World names in the backup filenames... pretty please! :D
     
  18. Offline

    Spathizilla

    Would it be possible to make it so you could schedule backups at specific times based on the server's clock?
     
  19. Offline

    desmin88

    @Spathizilla
    No, not really.
    I intend for the backup function to be barebones in this plugin.
     
  20. Offline

    Yahiko911

    Hy! This plugin awesome, but have a question. How can i load the back-up? If someone griefing, and i want to load the last world save, how can i do it?

    sry for english im hungarian
     
  21. Offline

    kaasinees

    Code:
    16:35:52 [INFO] [SimpleSave] Beginning world backup
    16:35:52 [INFO] [SimpleSave] Beginning world save
    16:35:52 [SEVERE] java.io.IOException: Stream Closed
    16:35:52 [SEVERE]       at java.io.RandomAccessFile.seek(Native Method)
    16:35:52 [SEVERE]       at net.minecraft.server.RegionFile.a(SourceFile:342)
    16:35:52 [SEVERE]       at net.minecraft.server.RegionFile.a(SourceFile:279)
    16:35:52 [SEVERE]       at net.minecraft.server.ChunkBuffer.close(SourceFile:259)
    16:35:52 [SEVERE]       at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:166)
    16:35:52 [SEVERE]       at java.io.FilterOutputStream.close(FilterOutputStream.java:160)
    16:35:52 [SEVERE]       at net.minecraft.server.ChunkRegionLoader.a(SourceFile:64)
    16:35:52 [SEVERE]       at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:160)
    16:35:52 [SEVERE]       at net.minecraft.server.ChunkProviderServer.saveChunks(ChunkProviderServer.java:190)
    16:35:52 [SEVERE]       at org.bukkit.craftbukkit.CraftWorld.save(CraftWorld.java:551)
    16:35:52 [SEVERE]       at org.desmin88.simplesave.Backup.backup(Backup.java:38)
    16:35:52 [SEVERE]       at org.desmin88.simplesave.SimpleSave$BackupMethod.run(SimpleSave.java:132)
    16:35:52 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    16:35:52 [SEVERE]       at java.lang.Thread.run(Thread.java:679)
    
     
  22. Offline

    desmin88

    @Yahiko911
    Find zipped backup in folder. Unzip the world folder into your cb root. done.
    @kaasinees
    Ignore this error.
     
  23. Offline

    kaasinees

    Suggestion for the backups folder structure.

    backups/worldname/YYYY-MM-DD/HH-MM-SS.zip
     
  24. Offline

    vein_mx

    do you have a reason for this? because the default for files is to have the year, then month, then date. that way, when users accumulate lots of backups and sorts by name, its in chronological order.
     
  25. Offline

    maystorm

    I'd second this one. YYYYMMDD makes it much easier to browse through the backup file list since it is ordered chronologically.
     
  26. Offline

    Maxis010

    I don't particularly care about the filename (at the minute anyway) but a timestamp format would do any coder a favour as some servers won't report their internal timestamps
     
  27. Offline

    desmin88

    In 2.2.1, I'll format the timestamp for YYYYMMDD
     
  28. Offline

    Drei Gyuu

    Has anyone ever had a problem with the liquids in the game not flowing properly while using this mod?

    Any fix for it?

    It starts out fine for me, and then after a while the water will not flow properly anymore. like you put down water and even after you kill the source you still see the water that flow from the source still there sitting on the ground. and they wont go away. Normally water goes away after you kill the source.

    I always have to restart my server to fix this issue but it always comes back.
     
  29. what colors are useable, i tried TEAL and DARK TEAL, but they just caused errors, even thou that is the names of some of the colors in minecraft.

    A full list of available colornames would be nice, especially since I dont much like the red color of the messages :)
     
  30. Offline

    Mochara

    Code:
    2011-05-09 17:15:41 [SEVERE] java.io.IOException: The handle is invalid
    2011-05-09 17:15:41 [SEVERE]     at java.io.RandomAccessFile.seek(Native Method)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.RegionFile.a(SourceFile:342)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.RegionFile.a(SourceFile:279)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.ChunkBuffer.close(SourceFile:259)
    2011-05-09 17:15:41 [SEVERE]     at java.util.zip.DeflaterOutputStream.close(Unknown Source)
    2011-05-09 17:15:41 [SEVERE]     at java.io.FilterOutputStream.close(Unknown Source)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.ChunkRegionLoader.a(SourceFile:64)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.ChunkProviderServer.saveChunk(ChunkProviderServer.java:160)
    2011-05-09 17:15:41 [SEVERE]     at net.minecraft.server.ChunkProviderServer.saveChunks(ChunkProviderServer.java:190)
    2011-05-09 17:15:41 [SEVERE]     at org.bukkit.craftbukkit.CraftWorld.save(CraftWorld.java:551)
    2011-05-09 17:15:41 [SEVERE]     at org.desmin88.simplesave.Backup.backup(Backup.java:36)
    2011-05-09 17:15:41 [SEVERE]     at org.desmin88.simplesave.SimpleSave$BackupMethod.run(SimpleSave.java:120)
    2011-05-09 17:15:41 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    2011-05-09 17:15:41 [SEVERE]     at java.lang.Thread.run(Unknown Source)
    Occurs during the backup but not during the save.

    EDIT: Nevermind, I see the issue has been addressed already.
     
  31. Offline

    Maxis010

    I thought I recognised this post so I searched your posts and what do I find, you pasted the same message in to every plugin you use

    Do some research rather than spamming the forums
    First off remove the water using a bucket then toss down the bucket, if the bucket remains full then you haven't done a false collection which is caused by lag
    Next use something like world edit to remove the water to see if it's an issue with buggy water
    Then if you find it's not lag and is buggy water remove your plugins 1 by 1 and try again

    Start a conversation with me to bring this further as I don't see the point in supporting a server in a plugin topic when the plugin is extremely unlikely to be the culprit and the poster can't be asked to do some work himself

    @ desmin88
    I see you use GitHUb (Sort of)
    Wouldn't it be easier to upload the Source there?

    EDIT: Also I had an idea for stopping Back-up and Save running at the same time
    Can you have save check the back-up timer and if the timer is about to expire abort the save
    Perhaps have a second timer running for save to trigger say 30 seconds earlier as a pre-check for imminent back-ups

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 11, 2016

Share This Page