This document explains how to run repo migrations for js-ipfs.
Note that the js-ipfs
command automatically runs migrations when a new version is installed, so you would normally not need to run the jsipfs-repo-migrations
tool.
jsipfs-repo-migrations
comes into play when the internal, on-disk format js-ipfs
uses to store data changes. To enable the new version of js-ipfs
to read the new data format, this tool upgrades from an old version of the repo to a new version.
If you run into any trouble, please feel free to open an issue in this repository.
The migration tool is safe -- it should not delete any data. If you have important data stored only in your ipfs node, and want to be extra safe, you can back up the whole repo with:
cp -r ~/.jsipfs ~/.jsipfs.backup
npm install ipfs-repo-migrations
To run the migration tool:
# to check if there are migrations that need to be applied
jsipfs-repo-migrations status
# if so, migrate to the latest version
jsipfs-repo-migrations migrate
If the migration completed without error, then you're done! Try running the new ipfs:
jsipfs daemon