8eba3a6 Mar 14, 2017
@jbenet @cryptix @whyrusleeping @RichardLitt @hsanjuan
47 lines (29 sloc) 1.63 KB

Running Repo Migrations

This document explains how to run fs-repo migrations for ipfs.

Note that running migrations is a task automatically performed by the ipfs when starting the ipfs daemon after an upgrade or running the ipfs-update tool, so you would normally not need to run the fs-repo-migrations tool.

The fs-migrations-tool comes into play when the internal, on-disk format ipfs uses to store data changes. In order to avoid losing data, this tool upgrades old versions of the repo to the new ones.

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:

# version 0
cp -r ~/.go-ipfs ~/.go-ipfs.bak

# version 1+
cp -r ~/.ipfs ~/.ipfs.bak

Step 1. Downloading the Migration

  • If you have Go installed: go get -u
  • Otherwise, download a prebuilt binary from the distributions page

Step 2. Run the Migration

Now, run the migration tool:

# if you installed from Go, tool is in your global $PATH

# otherwise, unzip the package, cd into it and run the binary:

Step 3. Done! Run IPFS.

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

ipfs daemon