If you are currently downloading this mod from a site other than curseforge.com then stop this instant and go download the mod from the proper site!
Backups is the ultimate backup mod. It will automatically backup your entire world every 15 minutes (configurable) and stores your backups in a format that takes up very little disk space. You can easily restore a world from ingame with the backups GUI and restore parts of your world with the restore command (requires cheats).
Please post any bugs you find or features you think I should add on the bug tracker. Any private messages to me about this mod will be ignored.
Features:
- Automatic Backups - Your world is automatically backed up every 15 minutes. You can also start a backup yourself by using the command /bm backup. The automatic backup intreval can be changed in the config file.
- Backups GUI - Clicking on the backups button when you have a world selected will display the backups GUI, which has a list of all backups for that world. The storage size and reason the backup was created are displayed below each backup, and the total storage size is displayed in the top-right.
Button Key:
- Restore - Creates a backup of the world and then restores the world from the selected backup.
- Enter Backup - Loads the selected backup as if it was a world. Anything you do while inside the backup isn't saved.
- Set Label - Allows you to set a label for the selected backup. Labeled backups won't be trimmed.
- Clear Label - Clears the label from the selected backup.
- Delete - Deletes the selected backups. You can shift-click to select multiple backups, or Ctrl-A to select all.
- Backup Trimming - Old backups are automatically deleted based on the following rules:
- If a backup is older than a hour, only one backup per hour is kept.
- If a backup is older than three days, only one backup per day is kept.
- If a backup is older than a month, only one backup per week is kept.
- Restore Command - The restore command allows you to restore a section of the world, or a player's inventory from an earlier backup. The command has two modes specifed by the first argument:
- Blocks Mode: - /bm restore blocks <x1> <y1> <z1> <x2> <y2> <z2> <backup>
Will restore all blocks from x1 y1 z1 to x2 y2 z2 to backup. The backup can be the number of backups ago, or the date and time for a specific backup. - Player Mode: - /bm restore player <player> <backup>
Will restore the inventory of player to backup. The backup can be the number of backups ago, or the date and time for a specific backup.
- Blocks Mode: - /bm restore blocks <x1> <y1> <z1> <x2> <y2> <z2> <backup>
- Backup Format - Backups are incremental, which means each backup only contains the data that has changed since the last backup. This greatly decreases the amount of disk space backups take up. Backups are also compressed, which decreases disk size even futher.
Restoring on a server: To restore a backup on a server use the server restore command like this: /bm restoreworld <backup>
Backup can be a date (The same date shown by /bm listbackups) or a number. If it's a number then the nth backup with be used. This command will close the server and then restore the backup. If you can't open the server (if the world's corrupted for example) then you can restore a backup from your computer's command line using the command java -jar <path to mod file> <backup dir> <world dir>. You can find all of the backups directories under backupsmod/<world name>/.
You can also use this batch script made by xJon which will automatically find the most recent backup. Just download it, place it in your server dir, and run it to restore the latest backup.
You can include this mod in any modpacks, as long as you give credit to me.
Hey Silly511
I'm not able to restore from a backup. I was able to restore from backups made from this mod before I added the mod Journeymap-1.12.2.2-5.7.1 (https://www.curseforge.com/minecraft/mc-mods/journeymap)
I'm playing through the Vanilla Minecraft Launcher where I installed Forge my self. (Forge version 14.23.5.2854, Minecraft Version 1.12.2)
Backups version: 1.5.6. Everything is being done through the in game GUI when I use the mod. Playing Single Player on a windows 10 machine. (Which could be a problem since window is a bit weird with links. Which I'm recently finding out while doing research on this.)
I'm thinking that I could of corrupted the increments when adding Journeymap. Jouneymap was added as an after thought months after successfully using backups mod.
Error to user seen in game is a screen at attempt of restore with text: "Unable to restore backup. <newline> The backup might be corrupted. Check logs for more details."
Here is the error log from Minecraft's logging console:
"""
"""
Seems like a possible file/folder perm issue. I don't have a lot of time to dig and solve this my self. Not to mention I may not have the skill to.
I can create a bug in your bug tracker at https://github.com/Silly511/Backups-Mod/issues as well if you like.
By the way, I like the concept of your low disk space use for backups. I'm hoping that I don't have to move to another backup mod.
In reply to BeatU4Klondike:
For some reason the mod can't delete your old save file. Try deleting your save manually, and then restoring the backup. There are entries in the world selection screen for deleted worlds at the bottom of the list.
In reply to Silly511:
Thanks for getting back to me.
I've been busy with other things since my last post. I'm just getting back to this.
I forgot to mention that I caught the problem I mentioned before I had a crisis on my hand. I was curious at the time if I could restore from a backup before I had a need to restore from one. I manually made my own backup as soon as I discovered I couldn't restore by your mod through the "Select World" in-game menu. Currently I still have a functional world save file and my own backups. Both are working fine.
So I still don't know why your mod isn't able to restore. That being said, I did find a current temp solution for restoring that seems to work.
I noticed that there is a tempWorld directory that is created when entering a backup snapshot. The tempWorld directory is located at the base directory of minecrafts appData location. That tempWorld directory looks to be the same saved world directory setup that I recognize for saved world directorys. And it looks to be complete when compared to regular save world directory setups for minecraft.
I found that I can take a copy of all contents of the tempWorld directory (after entering it and while it's existing), and have it overwrite into the save world directory of my target world. Then exit out of the Entered backup, and then play the world through regular means. I'm using windows file explorer interface to do overwriting. I'm assuming that this tempWorld directory is a full copy of the save world files at the time of the snapshot (without any linked files to anything).
Just to be sure that the world saves works after doing a restore from the tempWorld dir, I devised a test. I removed the backups jar from the mods dir. I changed the name of the backupsDir by adding "_" to the name of the directory (effectively turning it off but still having it around if still needed.) Started the game from the launcher, then checked to see if there were any backups listed in the in-game selected world menu. Which I found there were not. (what I was looking for). Loaded my target saved world through regular means (Select target world, then clicked on "Play Selected World"). I also checked that the tempWorld was not located in the minecraft appData base directory during this test as well. I'm able to play the world and it seems to be working fine from the manual restore from the tempWorld directory manual method. There is no linking from my manual restore from tempWorld. A full proper restore it seems.
6 days ago, I was tampering with the idea of doing this same manual restore/overwrite concept from the backup snapshots made by the backup mod in the backupsDir (backupsDir path defined in the mods config). But didn't feel that it was a good idea due to knowing a bit of how incremental backups will link some files back to earlier copy's of files in order to save space. I didn't want to have problems down the road from doing a manual restore from the backupsDir snapshot collection. (Example: manual restore backupsDir snapshot collection, then have a earlier made backups snapshots be removed for any reason, which would/could make my regular save world directory non functional due to missing a source files for a linked file.) I understand symbolic and hard links lightly for linux. Windows linking seems to be very confusing. And I'm not sure if I want to unravel that logical mess.
Currently I don't mind doing these manual restores form the tempWorld directory. But I feel this should be addressed for your mod. I'm feeling decently confident currently with my current solution using the Enter Backup then manually restoring from the tempWorld directory to my save world. Which I assume is something similar to what your mod is trying to do (without success on my setup).
I'm a hobbyist programmer, but not a serious java programmer. I'd fix it my self, but I don't have the time to get familiar with Java or my systems to a serious level likely required to fix/understand this. I wished that I did have the time. I usually enjoy learning IT related things, but this is likely not where I want to currently end up spending my valuable time. Currently looking into the documentation/references for the language makes my head spin currently. And I don't find it very rewarding to work with Java currently. Lol.
Also, I've not given your suggested steps in your reply a try yet, I'll likely give those a go and keep you posted.
In reply to BeatU4Klondike:
Do not copy the world from the tempWorld directory! It looks like a full copy of the world but it's not. As an optimization, whenever you enter a backup it'll copy everything except the region files (the region files store the actual blocks in the world). The region files are then copied on demand as minecraft tries to load them. This is because the region files are the biggest part of minecraft worlds and I found that when trying to enter a backup of a really large world (e.g. 2GB) it'll spend a long time copying all the region files when you really only need the files from the areas that you want to look at. So I changed it to only copy the region files when you actually need them. This greatly speeds up entering a backup, but it also means that the world in the tempWorld directory only contains the block data from areas that you visited while inside the backup. You could enter the backup, and then travel to all the places you want to keep, and then copy the world, but I'd definitionally save that as a last resort.
I'd try to fix the main problem myself, but unfortunately java.nio.file.AccessDeniedException is an extremely vague error. and without being able to look at your directory structure, I have no idea what the actual problem is. The restoring has always worked fine for me, so I assume that some file permission or something else has gotten messed up in your minecraft directory and it's preventing the mod from restoring properly.
In reply to Silly511:
Thanks for the heads up about using tempWorld. I was lucky with the tempWorld I manually pulled and restored from. It didn't have any missing regions important to me. I wont be using it though due to what I know now about the region data. I'll be falling back to my manual backup. That backup seems larger which tells me that it's region data is likely fine.
Also, I did try deleting the world from the in-game Select World menu and restoring from a backup made from your mod. I found that I still got the same exact error. Which is odd since I haven not done any permission fiddling. Despite this, I think I may of figured out what was causing all my issues.
After trying what you suggested, I then tried to delete the target world save directory through windows file explorer. I found that I couldn't.
Something good did come out of this. Windows was able to tell me what was going on. I had another program running that had opened files in my save world file. It was my favorite programing IDE! lol.
A little back ground about what I'm doing. So I'm building this mod pack to be a simple pack. With just a mapping (journey mod), backup (your mod), and in-game programable computers, robots, and drones (open computers mod). The mod pack is designed to be shared with a family member to help get them started and properly engaged with learning basic programing. I wanted to use Open Computers over Computer Craft since it's a lot more realistic to real world computing. Yet simple enough not to drive off the beginner I was introducing it to. Plus I like how Open Computers works and I could be of better help for someone else due to me being more familiar with it.
Lua is the programing language that is used for the in-game computers. And me being a more seasoned coder wanted to move faster with my script builds in-game when playing minecraft along with the mentioned family member. Open Computers exposes the Lua files built in-game exterior of the game. I had setup an IDE to edit the in-game scripts for efficiency.
Short story, I just needed to close my IDE (which closes my open file handles) before I do restores through your mod. (I constantly have it open when ever I play Minecraft.) I did a test of this and restores done in-game from your backup mod are working perfectly fine now! (Very Happy to be seeing this!)
It looks like the situation is good now and likely can be considered closed.
I hope that this helps with situations you and others may bump into that is similar in the future.
Where are backups stored?
In reply to Forge_User_15292010:
There's a backups or backupsmod folder in the minecraft folder, or said another way, on the same directory level as your mods and saves folder.
I only have the options of "Usage: /backupsmod <backup|lastbackup|restore> ..." no option for restoring the world. I've tried to use restoreworld, restore world, restoreWorld to no avail. I have tried this as a player and from console. Also /bm restoreworld is not recognized, since I assume in my version it hadn't yet been implemented. What is the right way to go about restoring a server backup?
Using Backups-1.12.2-1.4.5.jar
World is currently in a state that requires backup.
Is it safe to update and attempt restore after?
1.16.1 forge pls
In reply to minecraftixpll:
Echoing this request! There's a few different backup mods for 1.16, but none as well done as this one! I miss it!
A simplified Chinese translation for you. Thanks!
https://pastebin.com/NjTu8PR2
In reply to Zep_hys:
Thanks! I'll include it in the next version.
it fucking corrupted my worlds never get this
hey, i'm on the 1.12.2 pack i tried to restore it using the commands on my server but it just keeps putting the same world, the RestoreBackup bat says it restores but it does't work just keeps putting the same world, im on version 1.5.4 of the mod, im trying to restore the whole world.
In reply to Rektm31:
I was having the same issue man, I don't know what situation your in, but i was restoring it as a player, and it wasn't working. I'm running 1.5.5. I restored the second to latest backup and that seemed to work. Hope i could help!
In reply to Rektm31:
I had this problem, I was in the world when I tried to restore, so it was restoring to a different world. Check your minecraft folder!
Don't use this back up mod, the method of backup is absolutely horrible (it recursively compresses each file, not the entire world folder) then restoring the backup deletes EVERYTHING in the restore folder, so if you just so happen to put it in the wrong folder, everything is gone.
In reply to EveryoneBeTwitching:
Each file is compressed individually so that hard links can be created between backups for files that haven't changed since the last backup. That way each backup is incremental.
I don't know which method of restoring you're talking about, but both the restore command and the backups GUI create a backup before it restores the world. If you're talking about the command line restore, then what else it it supposed to do? Every command line tool I've every seen that deals with copying files will override the target.
not working in MC 1.14.4 /Forge 28.2.1
In reply to 1rosomak:
It's not working for 1.14 because there isn't a 1.14 version. I will update to 1.15 sometime in the future.