Jump to content

[1.5.2] ForgeBackup v1.1.2: Easy backups for SMP and SSP worlds


Recommended Posts

Posted

ForgeBackup v1.1.2

 

ForgeBackup is a simple mod that sits and backs up your server or single player worlds as you play. No more corrupted worlds due to issues with mods or other issues with your computer, just restore a backup and most of your work will still be saved even if disaster should strike. The initial concept was based heavily on ideas gleaned from BukkitBackup ported to the Minecraft Forge API, however it has now taken on a life of it's own and implements many features not found in the original plugin.

 

Installation:

 

Just download MinecraftForge and the appropriate version of this mod for your version of Minecraft from below and place this mod in your coremods folder. Again, please note that this is a coremod as of version 1.0 and needs to be placed in your coremods folder.

 

Downloads:

 

For other versions, see the old versions section below.

 

1.5.2

 

 

1.4.6/1.4.7

 

 

Features:

 

  • Perform automatic backups of SMP and SSP worlds.
  • Perform manual backups using the /backup command. This command can be used by command blocks if you allow it in the config.
  • Basic permissions support to allow anyone or only ops to run backups manually.
  • Archival backups. These are long term backups which have their own folder and can optionally backup more than the regular backups do. These backups are for longer term storage if needed and are run daily, or on startup if one hasn't been run today yet, and a certain number of daily and weekly backups can be kept. Weekly backups are backups that were taken on Sunday.
  • Backups can be created in many different formats, including one based on the git application which enables incremental backups. Beware with this, you may not get as much benefit from file-based incremental backups as you may think initially, though worst case this will still only use as much space as the 'none' option.
  • ForgeBackup is only required to be downloaded on the server for SMP worlds. The same download is used for both the client (SSP) and the server.
  • Ability to store backups anywhere via the configuration file.
  • Automatically clean up old backups (disabled by default).
  • Disable certain dimensions from being backed up. Don't backup large dimensions that you don't need or want to.
  • Ability to totally configure what gets backed up. Backup mods, configuration and your world, or any other files or folders you may wish to.

 

Compatibility:

 

ForgeBackup has a very low surface area that actually touches Minecraft. This means it should be highly compatible with just about any mod out there that isn't also trying to do backups. However, there has been some need for specific patches and so below is a list of other mods we've specifically made changes to accomodate or that we know don't work with Forgebackup.

 

  • ForgeEssentials: ForgeBackup is fully compatible. It overrides and hides the default Backups module from FE if it exists on the server. While ForgeBackup is compatible, there are currently no plans for integration, so you won't be able to control ForgeBackup via ForgeEssentials.

 

Bug Reports:

 

Always happy to receive them, but I can't help you if you don't help me. If you can't provide a log, then I probably can't help you. Please provide the console output as well as the ForgeModLoader.log (typically either ForgeModLoader-client-0.log or ForgeModLoader-server-0.log) from your minecraft folder. Please post issues on Bitbucket if you are able. I'm also usually available on EsperNet IRC as monoxide.

 

Permissions:

 

ForgeBackup is an open source mod. It is released under the MIT license.

 

Changelog:

 

There is a changelog available here.

 

Old Versions:

 

I'm not sure of the need for this section since this mod is only required on one side, either the server or the client. Old versions are here for those who want them though.

 

 

 

  • 4 weeks later...
Posted

Version 0.4.1 released! Click here to download it.

 

Changelog:

 

 

 

0.4.1

 

  • ForgeEssentials compatibility. We provide a module to FE which overrides their built-in backup module. This means you'll only have one active backup module at any time.

 

0.4.0

 

  • Many bug fixes, especially around notifying players of things.
  • Archival backups. These are long term backups which have their own folder and can optionally backup more than the regular backups do. These backups are for longer term storage if needed and are run daily, or on startup if one hasn't been run today yet, and a certain number of daily and weekly backups can be kept. Weekly backups are backups that were taken on Sunday.

 

 

Posted

Currently it only does full backups. I plan to add different compression methods later though (only zip is supported currently), and one of the one's I've been toying with is a git-based method which would allow for incremental backups.

Posted

Version 1.0 has been released! If you don't read the changelog, then there is one really important change. ForgeBackup is now a coremod. As of version 1.0, ForgeBackup must now be placed in your coremods folder, not your mods folder.

 

 

 

1.0.0

 

  • ForgeBackup is now a coremod and must be placed in your coremods folder.
  • Different compression types have now been implemented.
    • Firstly, tar.gz and tar.bz2 have been added. tar.gz is the new default on non-Windows systems.
    • There is a new git-based system. Please don't enable this if you do not have git installed on your pc, as you will not be able to restore backups older than the most recent one if you do. This will be resolved in a future version.

     

    [*] There is now an update reminder facility. This is disabled by default.

 

 

Posted

1.0.1 is released with just a few bugfixes, some urgent if you are using some features.

 

 

 

1.0.1

 

  • Fix an issue with absolute paths used as a backup path
  • Various other small bug fixes

 

 

Posted

1.0.2 is released. It is a primarily a bugfix release.

 

 

 

1.0.2

 

  • Fixed a bug with absolute paths
  • Expanded on our configuration documentation a lot

 

 

 

Also, a teaser for all you SSP players:

 

7DOzzXM.png

  • 2 weeks later...
Posted

Where the documention explaining the config file?

 

How do I backup other folders?

 

        # Other files or directories to backup.

        S:other <

        - configs, world, world_twilightforest

    >

Posted

In general, the documentation for the configuration is in the configuration file itself. Unfortunately, the forge configuration format for lists is a bit weird. Each item should be on it's own line, so for your example:

 

        # Other files or directories to backup.
        S:other <
         configs
         world
         world_twilightforest
       >

 

Note, the config folder and world folder should already be enabled anyway via the following options:

# Backup config folder.
B:configuration=true

# Backup world folder.
B:world=true

Posted

In general, the documentation for the configuration is in the configuration file itself. Unfortunately, the forge configuration format for lists is a bit weird. Each item should be on it's own line, so for your example:

 

        # Other files or directories to backup.
        S:other <
         configs
         world
         world_twilightforest
       >

 

Note, the config folder and world folder should already be enabled anyway via the following options:

# Backup config folder.
B:configuration=true

# Backup world folder.
B:world=true

 

Thanks. It works now.

Posted

First i want to thank you for this great Mod!

 

But i have a question: How is it possible to restore a backup?

Do i have to download, unpack and upload it manualy or is there another way? (i dont have SSH-access...only FTP!)

 

Thanks and greetz, Devi :-)

Posted

First i want to thank you for this great Mod!

 

But i have a question: How is it possible to restore a backup?

Do i have to download, unpack and upload it manualy or is there another way? (i dont have SSH-access...only FTP!)

 

Thanks and greetz, Devi :-)

 

Currently, yes you must do exactly this. Download, unpack and upload should be fine with mearly FTP access, as long as you can stop the server while you're doing it. In-game restores are planned for the future, hopefully 1.1, but I've been busy with other things. See up a few posts for the intended SSP version. I plan to make it as easy as possible for SMP also, with at least a `/backup restore <name>` and a way to list the backups.

Posted

hello i think i might be doing something wrong here. here is how my config looks:

 

 

# Configuration file

# Generated on 2/24/13 1:26 AM

 

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

# backup

#===================

# These settings control what things are backed up and how.

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

 

backup {

    # Folder name to store backups in. Each world's backups will be stored in

    # subfolders of this one. This can be an absolute path.

    #

    # Examples:

    # - backups

    # - C:\backups

    # - \\server\backups

    S:backupFolder=C:\Users\robin\Dropbox\FTBServerBackups    <=========== this line is the one i wanted to change to my dropbox folder

 

    # Type of compression to use when storing backups.

    #

    # Valid values:

    # - zip

    # - tgz

    # - tbz2

    # - git

    # - none

    S:compression=zip

 

    # Backup config folder.

    B:configuration=true

 

    # List of dimension id's to *not* backup. Use this to disable dimensions

    # that are large or unneeded. Currently it is impossible to disable

    # dimension 0 (the Overworld)

    #

    # Example to disable the nether in backups:

    # I:disabledDimensions <

    # -1

    # >

    I:disabledDimensions <

    >

 

        # Backup mods folder.

        B:mods=false

 

        # Other files or directories to backup.

        S:other <

    >

 

        # Backup server configuration files. eg. server.properties, whitelist.txt

        B:serverConfiguration=false

 

        # Backup world folder.

        B:world=true

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

    # longterm

    #===================

    # These settings control what and how things are backed up when doing an

    # archival backup. The file group settings are cumulative with the

    # regular backups. If you select to backup your world in the regular

    # backup, it will be enabled for longterm backups no matter what.

    # Disabled dimensions however do totally override the default settings.

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

 

    longterm {

        # Folder name to store backups in. Each world's backups will be stored in

        # subfolders of this one. This can be an absolute path.

        #

        # Examples:

        # - backups

        # - C:\backups

        # - \\server\backups

        S:backupFolder=archives

 

        # Type of compression to use when storing backups.

        #

        # Valid values:

        # - zip

        # - tgz

        # - tbz2

        # - git

        # - none

        S:compression=zip

 

        # Backup config folder.

        B:configuration=true

 

        # List of dimension id's to *not* backup. Use this to disable dimensions

        # that are large or unneeded. Currently it is impossible to disable

        # dimension 0 (the Overworld)

        #

        # Example to disable the nether in backups:

        # I:disabledDimensions <

        # -1

        # >

        I:disabledDimensions <

        >

 

            # Whether to enable separate long-term backups.

            B:enabled=false

 

            # The number of daily archival backups to keep.

            I:maxDailyBackups=7

 

            # The number of weekly archival backups to keep.

            I:maxWeeklyBackups=2

 

            # Backup mods folder.

            B:mods=false

 

            # Backup server configuration files. eg. server.properties, whitelist.txt

            B:serverConfiguration=false

 

            # Backup world folder.

            B:world=true

    }

 

}

 

 

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

# general

#===================

# General configuration options are here

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

 

general {

    # Interval in minutes between automatic backup attempts.

    I:backupInterval=480

 

    # Only run automated backups when there is a player connected to the

    # server. This option has no effect in single player. Long-term backups

    # will always run whether there are players connected or not.

    B:backupOnlyWithPlayer=false

 

    # If this is set to true, then ForgeBackup will check online for updates.

    # The update notification will only be sent to the console.

    B:checkUpdates=false

 

    # If this is set to true, then command blocks can be used with all `/backup` commands.

    B:commandBlocksAllowed=false

 

    # How much information to send to players while backing up.

    #

    # 0 = nothing

    # 1 = normal

    # 2 = debugging.

    I:loggingLevel=1

 

    # Maximum backups to keep stored. Older backups will be deleted first.

    # -1 will disable automated cleanups and no backups will ever be deleted.

    # This option has no effect if you are using the git compression type.

    I:maxBackups=8

 

    # If this is set to true, then only operators may manually run backups with `/backup run`.

    B:opsOnly=true

}

 

 

 

 

here is the error i get :

 

 

2013-02-24 01:50:00 [iNFO] [sTDERR] java.lang.NullPointerException

2013-02-24 01:50:00 [iNFO] [sTDERR]    at com.google.common.base.Preconditions.

checkNotNull(Preconditions.java:191)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at com.google.common.collect.Lists.newAr

rayList(Lists.java:96)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at monoxide.forgebackup.backup.RegularBa

ckupCleanup.runBackupCleanup(RegularBackupCleanup.java:22)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at monoxide.forgebackup.backup.Backup.do

Backup(Backup.java:104)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at monoxide.forgebackup.backup.Backup.ru

n(Backup.java:36)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at monoxide.forgebackup.command.CommandB

ackup$1.run(CommandBackup.java:53)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at java.lang.Thread.run(Unknown Source)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at monoxide.forgebackup.command.CommandB

ackup.b(CommandBackup.java:50)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at x.a(CommandHandler.java:82)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at iv.d(NetServerHandler.java:768)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at iv.a(NetServerHandler.java:734)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at cu.a(SourceFile:44)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at cg.b(TcpConnection.java:458)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at iv.d(NetServerHandler.java:136)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at iw.b(NetworkListenThread.java:57)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at ht.b(SourceFile:30)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at net.minecraft.server.MinecraftServer.

r(MinecraftServer.java:703)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at ho.r(DedicatedServer.java:269)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at net.minecraft.server.MinecraftServer.

q(MinecraftServer.java:599)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at net.minecraft.server.MinecraftServer.

run(MinecraftServer.java:497)

2013-02-24 01:50:00 [iNFO] [sTDERR]    at fy.run(SourceFile:849)

 

 

it happens when i do /backup run but when i do it with the normal folder the mod backs up too everything is fine. i just dont want it to backup there i want it to backup to my dropbox folder which is here : C:\Users\robin\Dropbox\FTBServerBackups

Posted

I can't reproduce this on linux, can you do a few things for me? First, are you using 1.0.2? If so, can you check if C:\Users\robin\Dropbox\FTBServerBackups exists after trying to run a backup?

 

Failing all that, can you try build 74 from https://www.dropbox.com/s/hkl7lg13h1sb8xu/forgebackup-universal-1.4.7-1.0.2.74.jar

 

There was some issues in the released version of 1.0.2 with absolute paths, though from your error I don't think that's what affecting you.

Posted

In BackupModContainer, "InputStream modInfo = BackupModContainer.class.getClassLoader().getResourceAsStream("mcmod.info");" should probably be "InputStream modInfo = BackupModContainer.class.getResourceAsStream("/mcmod.info");".

 

Currently it finds the first modinfo file in the classpath, which isn't necessarily the right modinfo file.

Posted

Forgebackup 1.0.3 released.

 

Changelog:

 

 

 

[ul]

  • Fixed another bug with absolute paths. Should be working perfectly now.
  • Fixed compatibility with ForgeEssentials so that it will work with all versions.
  • Add `/backup reload` command to allow reloading configuration file.
  • Fix issues with disabling Mystcraft dimensions from backing up.

[/ul]

 

 

  • 1 month later...
Posted

First of all: Incredible mod - making backups without creating any lag!

 

Now my problem: Incremental GIT backup wont work.

It does work first time, but then, i get this error:

 

width=800 height=450https://dl.dropboxusercontent.com/u/16186798/temp/minecraftforum/2013-04-15_15.26.27.png[/img]

 

my config: http://www.timelord.de/files/minecraft/forgebackup.html

 

some git commands of interest:

mc-ftb2@timelord:~/ftb2.gitbak/ftb2$ git log
commit 7818f710cde42933aee9b8fd16bccf66e99e43a1
Author: ForgeBackup <[email protected]>
Date:   Mon Apr 15 12:29:12 2013 +0200

    20130415-122009
mc-ftb2@timelord:~/ftb2.gitbak/ftb2$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#   (commit or discard the untracked or modified content in submodules)
#
#	modified:   ftb2/computer (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
mc-ftb2@timelord:~/ftb2.gitbak/ftb2$ git branch
* master

 

so, what is this error message trying to tell me?

using your backup with FTB ultimate pack btw - unmodified except for /tps command and your backup coremod. daily full backups seem to work - at least the first created a .tar.bz2 file just as expected.

Posted

The git backup is likely upset at the fact that the repo isn't clean when it tries to run a backup. The easiest way to verify that would be to check the actual server console which should tell you exactly what's wrong. What is in ftb2/computer? Did you add that folder/file yourself after the fact? ForgeBackup will only do a backup if the repo is currently completely clean and should commit everything it adds into the repo. It will also delete any files in the repo before adding a complete updated copy for the next commit. This means that it's a poor choice of location for you to be adding your own stuff to.

 

For now at least, the messages reported in chat can be generic/poor, but looking at the console should tell you exactly what's going on.

Posted

could have seen that myself.

of course, i didnt do any changes inside the backed up computer folder.

 

for testing, i did the following:

 

- delete backup

- start new backup

- wait till finished

- start new backup again

- get error as above

- solved the dirty git directory by deleting the computer subdirectory and doing a commit

- started backup

- wait till finished

- started backup again -> error

 

the computer directory originates from the ComputerCraft mod. Inside, i use soft-links. is it possible, those cause the problem?

 

edit: of course, i just remembered to have git controlling the computer/ directory with daily auto-commits. thats probably the source for error: git inside git. will exclude computer directory from snapshots and leave in longterm

Posted

yepp, it was a git tracked directory inside the world directory. removed the .git and autocommit script, and everything is alright now.

 

Yea, git is funny in how it deals with submodules, and ForgeBackup doesn't know about them at all so expect weird behaviour in that situation. I might relax that behaviour so that it only requires a clean index, but I'm not sure about that. Also, the git folder you've already done there would still not get backed up at all. Got a few interesting ideas how to deal with all that, but don't want to promise anything just yet.

 

This seems rather useful. Will use once it's updated =P

 

Sadly, I won't be able to update any time real soon I don't think. Work has been hectic and I've just had a bunch of hardware blow up recently, including my Jenkins server.

 

Posted

yepp, it was a git tracked directory inside the world directory. removed the .git and autocommit script, and everything is alright now.

 

Yea, git is funny in how it deals with submodules, and ForgeBackup doesn't know about them at all so expect weird behaviour in that situation. I might relax that behaviour so that it only requires a clean index, but I'm not sure about that. Also, the git folder you've already done there would still not get backed up at all. Got a few interesting ideas how to deal with all that, but don't want to promise anything just yet.

 

This seems rather useful. Will use once it's updated =P

 

Sadly, I won't be able to update any time real soon I don't think. Work has been hectic and I've just had a bunch of hardware blow up recently, including my Jenkins server.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.