Loading...
Beta Modpages Unclaimed

BTFU continuous rsync incremental backup

Fire-and-forget continuous server backup for the masses

0 Likes
6483 Downloads
Created by capitalthree

Description

 

Incremental backups that are just snapshots of your minecraft folder!  What?  You heard me!  85% disk savings* over regular snapshot backups!

* unless you chunkload your entire world, or keep a very small amount of snapshots anyways.

 

How is this possible?  Hardlinks.  If you are a seasoned system administrator you already know about them.  If not, hardlinks are a way to have multiple filesystem entries for the same file without taking up extra space, and your computer that can run minecraft already supports them!

(To be specific, NTFS and every non-microsoft filesystem since forever, support hardlinks.)

 

BTFU takes the compromise-work out of deciding how often to back up by doing it constantly (every 5 minutes), and just being efficient.  As it goes, it prunes the backups, keeping only a specified number of them (128 by default), and the pruning is logarithmic, so that you will have more frequent backups in your recent history, but it still keeps assorted snapshots dating back to the start of your world.  You are free to delete snapshots as desired (eg to trim old history, or if you restored a prior backup) and it will let the count reach the limit again before resuming automatic pruning.  This is because even with incremental backup, taking 5 minute snapshots forever would fill your disk.

 

 

Inspiration

 

BTFU implements a time-honored UNIX backup strategy.  It uses rsync (or a jvm reimplementation) to sync your server state to a master backup copy, and then makes a hardlinked copy of that to a datestamped folder.  Hardlinks are files that point to the same underlying data on disk.  Because of this, each new backup takes up only as much space as however many files have changed since the last one.  In other words, backups of your 5GB world don't take 5GB each, unless the whole dang thing is chunkloaded.  Backups still can't be kept forever, so BTFU will prune the backups logarithmically, meaning that it will keep a higher density of more recent backups, but will always retain the original backup and a complete history of your world.  (You can also manually delete any backups you wish, and BTFU will not mind.)

 

 

Why do I need it?

 

Other backup mods I've found all had one of two problems: either they back up very infrequently (hourly or worse), or if they do support incremental backup, do it in some format where you have to use the mod's own tools to do any restoring.  Because of the possibility for better efficiency, many minecraft server admins already use a version of the backup scheme described above that inspired BTFU.  In fact, if you already have such scripts, including calling save-all flush before backups, then BTFU is simply another way of automating what you already have.  There's no magic here!  I simply found it very convenient to have my favorite backup scheme automated out of the box as a forge mod.

 

So you don't need BTFU, but if you're currently keeping infrequent backups, few backups, or no backups, BTFU is here for you with an easier way to do backup the way the linux wizards do backup.  Once you configure your backups directory, you can forget about BTFU until something goes wrong.  If it has issues taking a backup, it will print log messages.  Otherwise it will stay quiet and do its job.

 

 

Other backup advice

 

There are two major threats to your world.  This mod is here primarily to defend against world corruption from buggy mods or other issues.  The other threat is underlying issues with your disk or filesystem.  If you want BTFU you to defend against those, then it is up to you to ensure your BTFU backups directory is on a separate disk.  It should go without saying that backing up to a folder right next to the server folder, won't help if that hard drive dies.

 

The only way to get perfectly consistent backups is to fully shut down the server first.  For example, say some player deposits an item from mod-based storage into a vanilla chest right before a backup, and the mod doesn't respect the save-all command.  The resulting backup might have that item duped, because it exists in both the synced chest and the old un-synced version of the mod's storage.  These issues are not likely to be a serious issue or hose your server, but the possibility is something to be aware of.  Even if you use BTFU, it might also be good to occasionally shut down your server and take an offline backup.  Personally, I don't bother.  Up to you.

 

 

Feedback

 

People's interest fuels my modding.  A simple comment like "hey I put this on my server, it's kinda convenient" could make the next update come sooner!  Reports of any issues you have, or any suggestions for the future, even better.


AD Become Premium to remove Ads!

What means Verified?

  • Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
  • Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
  • Security: The mod should not contain any malicious code or attempts to steal personal information.
  • Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
  • Originality: The mod should be original and not a copy of someone else's work.
  • Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
  • Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
  • License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
  • Documentation: The mod should come with clear and detailed documentation on how to install and use it.

AD Become Premium to remove Ads!

How to Install

1

Download Forge & Java

Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.

2

Prepare

Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.

3

Add Mods

Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder

4

Enjoy

You are now Ready. Re-start your Game and start Playing.

More Mods like this

Clumps

Clumps XP orbs together to reduce lag

Morpheus

Sleep vote system

FTB Utilities (Forge)

FTB Utilities is a mod by FTB. It aims to provide several useful utilities within the FTB Platform ranging from friends list, server configuration utilities, world borders, guide system and many other features...

spark

spark is a performance profiler for Minecraft clients, servers and proxies.

Lootr (Forge & NeoForge)

A mod that makes it so nobody misses out on Loot! All loot chests are instanced per player and visually unique.