Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Latest commit

 

History

History
41 lines (25 loc) · 1.42 KB

run.md

File metadata and controls

41 lines (25 loc) · 1.42 KB

Running Repo Migrations

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.

Step 0. Back up your repo (optional)

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

Step 1. Downloading the Migration

npm install ipfs-repo-migrations

Step 2. Run the Migration

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

Step 3. Done! Run IPFS.

If the migration completed without error, then you're done! Try running the new ipfs:

jsipfs daemon