Shopkeepers

Shopkeepers

2M Downloads

Help with migrating `save.yml` to older version

DiegoG1019 opened this issue ยท 1 comments

commented

Preliminaries:

  • Shopkeepers version: From2.19.0to2.17.2`
  • Spigot version: ``From 1.20.4 (4011) to 1.20.1 (3871)

  • I have checked that my issue/question does not get answered by:
  • I have checked all open and closed issues, but none seems to fit my issue/question.

Reproduction on a fresh and up-to-date Spigot server:

Create a Server on a newer version of Spigot and Shopkeeper, create a couple of shops, then switch to a slightly older version and restart the server.

The issue:

My problem is a simple one; I'd like help to backport a Shopkeeper/data/save.yml back to an older version of spigot; I realize there isn't and probably shouldn't be support for this, so I'd only like to know if anyone can help me accomplish this, or some things I should watch out for. My problem is mainly that I created them using a newer version of Spigot (1.20.4 (4011)) and had to switch to an older one due to incompatibility issues; but I created a lot of admin shops and would like to keep them.

If possible, if there are known differences with serialization between the two versions that you've noticed, I could probably develop a tool that does the migration, but I can't spot them after messing around with the file a bit

Thank you for your time.

commented

Make a backup before you attempt anything.
Then, you can try replacing all occurrences of the 4011 dataversion with the data version for 1.20.1 (3871).

Regarding other data differences: The chances are good that there were not that many differences compared to 1.20.1. However, there has been a change related to all PublicBukkitValues and also BlockStateTag values.

PublicBukkitValues:
  "grapplinghook:id": "diamond_hook"
  "grapplinghook:uses": 100

became something similar to

PublicBukkitValues: |-
  {
    "grapplinghook:id": "diamond_hook",
    "grapplinghook:uses": "100i"
  }

The plugin should throw an error whenever it fails to load your save file. The errors might contain some additional details about the kind of data that could not be loaded. If you cannot figure out the error, you can also consider linking your save.yml file and the concrete errors here, or in the Discord.