How to download files after running "ipfs pin add"

I’m new to running my own node on AWS. I’m pinning by files from by running ipfs pin add bafy... but how do I download these files to a backup? I wish to cold store the files on my PC.

That gonna store a hot copy in ~/.ipfs/blocks/... folders.

ipfs dag export bafyfoo >

That will save an cold copy, which is an archive of all the IPFS blocks needed to reconstruct bafyfoo.

(use ipfs dag import < to import it back)

You can save on aws glacier, a NAS, a real of tape, … whatever is your favorite cold storage solution.

1 Like

Thanks so much for replying. So, I did the below.

ipfs dag export bafybei >

But I got the error,

Error: unable to parse root specification (currently only bare CIDs are supported): varints malformed, could not reach the end

Btw, I’m assuming root CID means the first new characters in a CID that are the same for all the CIDs such as babfybei in bafybeicwyopxllpcjnof4zymsz4mzqehyoq5ha2zh4jlqzu6ikujmfa6ni

sorry foo is a classical CS term for “this is an example and I’m too lazy to type it completely”.
You actually need to use the full CID:

ipfs dag export bafybeicwyopxllpcjnof4zymsz4mzqehyoq5ha2zh4jlqzu6ikujmfa6ni >