Lesson: Sneakernets - moving the data on USB Drives and other Hardware
We're not kidding. If you'd like to move IPFS content between networks via sneakernet, IPFS is just fine with that. This lesson covers how to load IPFS content onto storage devices like USB drives so that you can physically move the content to new networks and then re-publish it. Without ever relying on a direct connection between the networks, this will make the IPFS links for your content valid on both sides of the air gap.
Examples of how this is useful:
- Make internet content available in places that don't have direct connections to the internet backbone (remote locations with limited connectivity, space stations)
- Circumvent censorship by governments, corporations and overbearing parents.
For this example we will pretend you're using an external drive to move a snapshot of wikipedia from IPFS to a new network where wikipedia isn't available.
To do the steps in this lesson you must:
After doing this Lesson you will know how to physically move IPFS content across an airgap, making it available over IPFS and HTTP on the other side.
ipfs getcommand to download the content you want to move across networks. In this example, we download a complete snapshot of Wikipedia archive to disk, saving it as a folder called
WikipediaSnapshot(Warning: this snapshot is 15 GB. You might want to use something smaller):
$ ipfs get Qme2sLfe9ZMdiuWsEtajWMDzx6B7VbjzpSC2VWhtB6GoB1/wiki/Anasayfa.html -o WikipediaSnapshot
Download the latest IPFS binaries into your drive too. You will need this in order to publish the content on the other side. Make sure to download the appropriate go-ipfs binary for the computer you will be moving the data to. Note: there might be a newer version of ipfs available when you read this. Find out the most current version number at https://dist.ipfs.io/#go-ipfs
$ ipfs get /ipns/dist.ipfs.io/go-ipfs/v0.4.8 -o go-ipfs-v0.4.8
- Copy the snapshot (ie. the folder "WikipediaSnapshot") to your external drive
- Copy the IPFS binaries you downloaded (ie. the folder "go-ipfs-v0.4.8") into your external drive
- Eject your external drive
- Physically carry your external drive to the next computer you want to use the information from.
Then import the data into ipfs (in this case, the folder called
$ ipfs add -r WikipediaSnapshot
Start the ipfs daemon:
This approach allows you to physically move IPFS content into networks where it was previously unavailable.
Because IPFS uses content-addressing, as long as the content you added to the second network is identical to the original content you originally exported from IPFS, the IPFS identifier for your content will be identical in both networks.