Restitutor is the pride of <SUBJECT HOMETOWN HERE>

Partial Map Reset Process

No replies
RestitutorOrbis's picture
Name: RestitutorOrbis (Restitutor)
Joined: Aug 24 2014

Here's the process used to partial map reset the creative map yesterday (Feb 4th) after /killall all was used. The map had to be reset as all entities in players' builds such as painting were lost.

MC1 was shutdown.
stop command

The creative folder was renamed so that it would be a backup map.
mv creative creativeBak

The creative backup was extracted into the creative folder on the server's "top" directory. Tab completion was used to select the most recent backup.
unzip backups/worlds/creative/

The uid.dat was deleted from the creativeBak (the original world with block changes but missing entities) as two worlds can't have the same uid.dat and it is regen'd as needed.
rm creativeBak/uid.dat

A series of files and folders were removed from the creative folder (the backup world with entities but which misses block data). These included anything that wasn't region data. ls creative was used to list the files in the creative folder so they could be removed.

rm -r creative/data
cp -r creativeBak/data creative/data
cp creativeBak/level.dat creative/level.dat
rm -r creative/playerdata
cp -r creativeBak/playerdata creative/playerdata
rm -r creative/stats
rm -r creative/structures
cp -r creativeBak/stats creative/stats
cp -r creativeBak/structures creative/structures

Note that cp is copy, rm is remove/delete, and the -r flag is recursive to allow for folders.

The two folders were compared to make sure the list of files and folders are the same so nothing's missing. Note that the creative folder now has all the other data such as playerdata from the most recent save, but has all the region data from the backup.

Now, quota is run to ensure that extracting this folder did not fill the quota. If the quota is filled, files may randomly get corrupted on MC1 and MC4 which would be an extremely serious issue (similar to the loss of nearly all Essentials data in Jan 1 2015).

After quota was run, it turned out that the quota was filled. So backups had to be purged.

cd backups
cd worlds
cd creative

Now the server could be started up.

Once in game, a few more commands needed to be used.

This imports the backup world with the recent block edits.
mvimport creativeBak normal

In addition, /lastlog would normally be used in this case - however it was known that only a few users made block edits so the following was run.

CoreProtect records all block actions. While this allows a rollback to go back in time from a current map, it could also allow /co restore to allow one to go back in time to a more current map (just without the WorldEdit). In other cases, it'd best to take the time of the timestamp on the extracted backup and plug it into WolframAlpha to determine the exact number of hours and minutes to rollback.
/co restore u:jordizzle140398,werewolf991 t:1d

Lastly, WorldEdit builds needed to be restored. This was done by using /world creativeBak, finding a build, and making a selection. Then //pos1 and //pos2 were used with a few //expand commands. Then //copy was used, /world creative, and //paste all without moving so that the most recent block edits would appear in the backup map.