Backups and Recovery: Difference between revisions

From GT New Horizons
Content added Content deleted
(→‎FTB Utilities: how to adjust # of backups.)
m (NBT link)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page guides you through setting up a backup mod and/or recovering a corrupt world. You have several options, depending on your familiarity with file systems.
[[Category:Guides]]


== Backup Options ==
This page guides you through setting up a backup mod and/or recovering a corrupt world.
=== Manual Backup ===

= Backup Options =
You have several options, depending on your familiarity with filesystems.
== Manual Backup ==
This, of course, has to be done manually. You can also write a simple [https://en.m.wikipedia.org/wiki/Batch_file batch file] or other script to do it automatically. Make sure you capture everything in your save file, as well as the ''journeymap'' and ''tcnodefinder'' directories. This is best done before or after each gaming session.
This, of course, has to be done manually. You can also write a simple [https://en.m.wikipedia.org/wiki/Batch_file batch file] or other script to do it automatically. Make sure you capture everything in your save file, as well as the ''journeymap'' and ''tcnodefinder'' directories. This is best done before or after each gaming session.


Line 17: Line 14:
* Files must be saved and restored from command line or a file explorer.
* Files must be saved and restored from command line or a file explorer.


== AromaBackup ==
=== AromaBackup ===
[https://minecraft.curseforge.com/projects/aromabackup AromaBackup] allows users to automatically backup worlds. It allows you to choose the frequency of backups, along with the number to keep. Recommended for use in singleplayer or LAN worlds.
[https://minecraft.curseforge.com/projects/aromabackup AromaBackup] allows users to automatically backup worlds. It allows you to choose the frequency of backups, along with the number to keep. Recommended for use in singleplayer or LAN worlds. Comes installed with GT:NH by default.


Config under <code>config/aroma1997/AromaBackup.cfg</code>
Config under <code>config/aroma1997/AromaBackup.cfg</code>
Change <code>I:keep=20</code> to alter the number of backups AromaBackup maintains.


Pros:
Pros:
Line 26: Line 24:
*Easy to use in-game interface to restore from backup
*Easy to use in-game interface to restore from backup
*Works fine without configuration
*Works fine without configuration
*Included by default with single-player pack of GTNH
*Distributed with GTNH in newer versions


Cons:
Cons:
Line 36: Line 34:


Here are some detailed steps to installing AromaBackup on a server:
Here are some detailed steps to installing AromaBackup on a server:
*Download this: https://www.curseforge.com/minecraft/mc-mods/aromabackup/files/all?filter-game-version=2020709689%3A4449
*Download this: https://www.curseforge.com/minecraft/mc-mods/aromabackup/files?page=1&pageSize=20&version=1.7.10
*Download this: https://www.curseforge.com/minecraft/mc-mods/aroma1997core/files/all?filter-game-version=2020709689%3A4449
*Download this: https://www.curseforge.com/minecraft/mc-mods/aroma1997core/files?page=1&pageSize=20&version=1.7.10
*Put both files in the mods/ folder
*Put both files in the mods/ folder
*Verify that you see messages like "[AromaBackup/INFO]: [º1AromaBackupºr] Server Backup done!" in the server console
*Verify that you see messages like "[AromaBackup/INFO]: [º1AromaBackupºr] Server Backup done!" in the server console
Line 43: Line 41:
*Please note that it seems that running the .jar file is no longer working
*Please note that it seems that running the .jar file is no longer working


==FTB Utilities==
=== FTB Utilities ===
FTB Utilities also allows users to back up worlds, in addition to offering several other features and being highly configurable. Recommended for server-hosted worlds.
FTB Utilities also allows users to back up worlds, in addition to offering several other features and being highly configurable. Recommended for server-hosted worlds.


Line 65: Line 63:
*Does not come pre-packaged with GTNH
*Does not come pre-packaged with GTNH


==Yet Another Backup Mod - No Compression Fork ==
=== Yet Another Backup Mod - No Compression Fork ===
This mod, a custom fork of ''Yet Another Backup Mod'', was written by GTNH user jackowski626. It can be found [https://github.com/jackowski626/YetAnotherBackupMod/releases/tag/v1.7.10-1.0.4-no-compression on GitHub] and allows users to store backups uncompressed. Recommended for use on rented servers where you might not have access to the host console.
This mod, a custom fork of ''Yet Another Backup Mod'', was written by GTNH user jackowski626. It can be found [https://github.com/jackowski626/YetAnotherBackupMod/releases/tag/v1.7.10-1.0.4-no-compression on GitHub] and allows users to store backups uncompressed. Recommended for use on rented servers where you might not have access to the host console.


Line 77: Line 75:
*Does not come pre-packaged with GTNH
*Does not come pre-packaged with GTNH


=Recovery Options=
==Recovery Options==
Once you've made your backups, a time will come when you have to restore them, whether your world corrupts itself, your quests glitch up, or you just blow up all your machines in a freak transformer accident.
Once you've made your backups, a time will come when you have to restore them, whether your world corrupts itself, your quests glitch up, or you just blow up all your machines in a freak transformer accident.


All of these mods make restoring a backup pretty easy. Simply navigate to where backups are stored (typically in a ''backups'' folder inside your GTNH installation) and find whichever backup you want to restore from (backups are usually stored by date - ones found later in alphabetical order are likely to be newer). Unzip the backup file you want (or just grab it, if you're using uncompressed backups), remove your old save from ''saves'' (or move it somewhere else instead, just in case!), and copy-paste the new one in.
All of these mods make restoring a backup pretty easy. Simply navigate to where backups are stored (typically in a ''backups'' folder inside your GTNH installation) and find whichever backup you want to restore from (backups are usually stored by date - ones found later in alphabetical order are likely to be newer). Unzip the backup file you want (or just grab it, if you're using uncompressed backups), remove your old save from ''saves'' (or move it somewhere else instead, just in case!), and copy-paste the new one in.


===Backups Missing===
=Help! I didn’t make any backups!=
'''Note''': This shouldn’t happen often in more recent versions – AromaBackup comes with GTNH and is set up for you by default.
'''Note''': This shouldn’t happen often in more recent versions – AromaBackup comes with GTNH and is set up for you by default for single player. Servers need to [[Server_Setup#Install_a_mod_for_backups|install a backup option manually]].


Try looking at the crash log in logs/latest.log and see what may be causing the issue, and continue to the section below. This will only help you repair a save that doesn’t load - if your base blew up, sad times.
Try looking at the crash log in logs/latest.log and see what may be causing the issue, and continue to the section below. This will only help you repair a save that doesn’t load - if your base blew up, sad times.

==Corrupt chunk==
=== Corrupt Chunk ===
If the crash file identifies the corrupt chunk or Region file (each Region file is 32x32 chunks), try these steps:
If the crash file identifies the corrupt chunk or Region file (each Region file is 32x32 chunks), try these steps:
* First, back up ''level.dat'' and ''level.dat_old''.
* First, back up ''level.dat'' and ''level.dat_old''.
Line 94: Line 93:
* Go through the ''.mca'' files in the save folder, and alternate between deleting one and loading the world. Once the world loads successfully, you now know which file is corrupted. If you suspect a certain chunk, try looking at the pictures in ''journeymap'' to see which region file it may be. The names of the pictures in ''journeymap'' correspond to the region.
* Go through the ''.mca'' files in the save folder, and alternate between deleting one and loading the world. Once the world loads successfully, you now know which file is corrupted. If you suspect a certain chunk, try looking at the pictures in ''journeymap'' to see which region file it may be. The names of the pictures in ''journeymap'' correspond to the region.
*Once you know which file is corrupt, you can delete or repair it. If the Journeymap for that chunk shows nothing important, it's okay to delete. Minecraft will regenerate the chunks fresh next time you login.
*Once you know which file is corrupt, you can delete or repair it. If the Journeymap for that chunk shows nothing important, it's okay to delete. Minecraft will regenerate the chunks fresh next time you login.
* If you need to repair (for example, if part of your base is in the chunk) use a map or NBT editor to import the ''.mca'' file and edit out the bad block or entity.
* If you need to repair (for example, if part of your base is in the chunk) use a map or [[NBT]] editor to import the ''.mca'' file and edit out the bad block or entity.
* '''For advanced users''': You can use this tool, provided by bartimaeusnek, which will split up an MCA File to Chunks: https://github.com/bartimaeusnek/RegionSplitter/releases/download/0.0.2/RegionSplitter0.0.2.jar
* '''For advanced users''': You can use this tool, provided by bartimaeusnek, which will split up an MCA File to Chunks: https://github.com/bartimaeusnek/RegionSplitter/releases/download/0.0.2/RegionSplitter0.0.2.jar


==Backing up items in-game==
== Backing up items in-game ==
1.7.10 lacks many of the features available by default in more modern incarnations of NEI/Creative, such as saving and loading hotbars. If you want to make a save of your important tools, Golden Lasso'd creatures or items, bookmark them in NEI. You'll be able to respawn a backup copy (including all metadata) if you go into Cheat Mode.
1.7.10 lacks many of the features available by default in more modern incarnations of [[NEI]]/Creative, such as saving and loading hotbars. If you want to make a save of your important tools, Golden Lasso'd creatures or items, bookmark them in NEI. You'll be able to respawn a backup copy (including all metadata) if you go into Cheat Mode. The bookmark data is stored in <code>/your_instance/saves/NEI/global/bookmarks.ini</code> by default. This file can be opened in a text editor or backed up to safeguard any item that can be bookmarked. Be warned that [[Backpack (Editted for ModdedNetwork)|Backpack]]s from Editted for ModdedNetwork have external file storage, thus cannot be backed up with NEI bookmarks.

This method can also be used to transfer items and even [[Dolly|dollied]] chests between worlds, particularly helpful if you need to test something without messing up your survival world.


{{Template:Navbar GTNH}}
This method can also be used to transfer items between worlds, particularly helpful if you need to test something without messing up your current world.
[[Category:Guides]][[Category:Troubleshooting]]

Latest revision as of 03:55, 31 December 2023

This page guides you through setting up a backup mod and/or recovering a corrupt world. You have several options, depending on your familiarity with file systems.

Backup Options

Manual Backup

This, of course, has to be done manually. You can also write a simple batch file or other script to do it automatically. Make sure you capture everything in your save file, as well as the journeymap and tcnodefinder directories. This is best done before or after each gaming session.

Pros:

  • You can copy exactly what you want (and automatically so, with a custom script.)
  • Zipping the directories will save space, and only saving differences from the previous backup can save even more. (However, some backup tools may also provide these features – not tested.)

Cons:

  • Doing this requires some familiarity with files and filesystems.
  • Backing up the world while playing may result in corruption or file errors (not tested.)
  • Files must be saved and restored from command line or a file explorer.

AromaBackup

AromaBackup allows users to automatically backup worlds. It allows you to choose the frequency of backups, along with the number to keep. Recommended for use in singleplayer or LAN worlds. Comes installed with GT:NH by default.

Config under config/aroma1997/AromaBackup.cfg Change I:keep=20 to alter the number of backups AromaBackup maintains.

Pros:

  • Using a config file, you can choose the frequency of backups, along with the amount to keep.
  • Easy to use in-game interface to restore from backup
  • Works fine without configuration
  • Included by default with single-player pack of GTNH

Cons:

  • Options might be a little flaky - keep an eye on HD usage, and flush old backups occasionally.
  • Does not backup journeymap or tcnodefinder directories

Cons when used with old versions of GTNH:

  • Requires Aroma1997Core.
  • If used on a server, clients must also have Aroma1997Core installed.

Here are some detailed steps to installing AromaBackup on a server:

FTB Utilities

FTB Utilities also allows users to back up worlds, in addition to offering several other features and being highly configurable. Recommended for server-hosted worlds.

GTNH Version of FTBUtilities (download plain non-sourcesor-devjar, e.g. FTBUtilities-1.7.10-1.0.18.7-GTNH.jar)

GTNH Version of FTBLib (required)

Latest builds may also be found on Jenkins

Config under local/ftbu/config.json Change "backups_to_keep": 12, to adjust the number of backup instances FTB maintains.

Pros:

  • Adds other utilities, such as chunkloading
  • Is highly configurable
  • Does not require any client-side installs

Cons:

  • Somewhat more difficult to configure
  • Documentation on how to configure is no longer available on the FTB documentation site
  • Does not come pre-packaged with GTNH

Yet Another Backup Mod - No Compression Fork

This mod, a custom fork of Yet Another Backup Mod, was written by GTNH user jackowski626. It can be found on GitHub and allows users to store backups uncompressed. Recommended for use on rented servers where you might not have access to the host console.

Pros:

  • Can store uncompressed (as well as compressed) backups, which makes them easier to restore without commandline access
  • Does not require any client-side installs

Cons:

  • Uncompressed backups, take up more space.
  • Only does backups (may be a pro, depending on your use case)
  • Does not come pre-packaged with GTNH

Recovery Options

Once you've made your backups, a time will come when you have to restore them, whether your world corrupts itself, your quests glitch up, or you just blow up all your machines in a freak transformer accident.

All of these mods make restoring a backup pretty easy. Simply navigate to where backups are stored (typically in a backups folder inside your GTNH installation) and find whichever backup you want to restore from (backups are usually stored by date - ones found later in alphabetical order are likely to be newer). Unzip the backup file you want (or just grab it, if you're using uncompressed backups), remove your old save from saves (or move it somewhere else instead, just in case!), and copy-paste the new one in.

Backups Missing

Note: This shouldn’t happen often in more recent versions – AromaBackup comes with GTNH and is set up for you by default for single player. Servers need to install a backup option manually.

Try looking at the crash log in logs/latest.log and see what may be causing the issue, and continue to the section below. This will only help you repair a save that doesn’t load - if your base blew up, sad times.

Corrupt Chunk

If the crash file identifies the corrupt chunk or Region file (each Region file is 32x32 chunks), try these steps:

  • First, back up level.dat and level.dat_old.
  • Delete level.dat and rename level.dat_old to level.dat.
  • If this works, great! If not, continue...
  • Back up the entire save folder, along with journeymap and tcnodefinder.
  • Go through the .mca files in the save folder, and alternate between deleting one and loading the world. Once the world loads successfully, you now know which file is corrupted. If you suspect a certain chunk, try looking at the pictures in journeymap to see which region file it may be. The names of the pictures in journeymap correspond to the region.
  • Once you know which file is corrupt, you can delete or repair it. If the Journeymap for that chunk shows nothing important, it's okay to delete. Minecraft will regenerate the chunks fresh next time you login.
  • If you need to repair (for example, if part of your base is in the chunk) use a map or NBT editor to import the .mca file and edit out the bad block or entity.
  • For advanced users: You can use this tool, provided by bartimaeusnek, which will split up an MCA File to Chunks: https://github.com/bartimaeusnek/RegionSplitter/releases/download/0.0.2/RegionSplitter0.0.2.jar

Backing up items in-game

1.7.10 lacks many of the features available by default in more modern incarnations of NEI/Creative, such as saving and loading hotbars. If you want to make a save of your important tools, Golden Lasso'd creatures or items, bookmark them in NEI. You'll be able to respawn a backup copy (including all metadata) if you go into Cheat Mode. The bookmark data is stored in /your_instance/saves/NEI/global/bookmarks.ini by default. This file can be opened in a text editor or backed up to safeguard any item that can be bookmarked. Be warned that Backpacks from Editted for ModdedNetwork have external file storage, thus cannot be backed up with NEI bookmarks.

This method can also be used to transfer items and even dollied chests between worlds, particularly helpful if you need to test something without messing up your survival world.