That’s exactly what I need!
Thank you Michael, greatly appreciated!!! Does it add to existing ipfs repo or replace it?
Well, it would be if it would build without errors. I tried the most recent version of go (1.13.5) and 1.13.4 on linux amd64:
ipfs@ronnyc:~/scripts/ipfs$ go get -u github.com/INFURA/ipfs-pump
# github.com/ipfs/go-ds-flatfs
../../go/src/github.com/ipfs/go-ds-flatfs/convert.go:154:7: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:927:6: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:943:6: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:949:7: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:955:6: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:960:6: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
../../go/src/github.com/ipfs/go-ds-flatfs/flatfs.go:1040:7: log.Warningf undefined (type *log.ZapEventLogger has no field or method Warningf)
# github.com/ipfs/go-ds-s3
../../go/src/github.com/ipfs/go-ds-s3/s3.go:375:5: cannot use (*S3Bucket)(nil) (type *S3Bucket) as type datastore.Batching in assignment:
*S3Bucket does not implement datastore.Batching (missing Sync method)
# github.com/ipfs/go-ds-badger
../../go/src/github.com/ipfs/go-ds-badger/datastore.go:114:13: cannot use log (type *"github.com/ipfs/go-log".ZapEventLogger) as type badger.Logger in assignment:
*"github.com/ipfs/go-log".ZapEventLogger does not implement badger.Logger (missing Warningf method)
ipfs@ronnyc:~/scripts/ipfs$ ls go/bin
total 0
Which version did you use to build it?
Never played with go src, but I removed the 2 offending lines and ran "cd ~/go/src/github.com/INFURA/ipfs-pump; “go build ./main.go” . It seemed to compile, there were no errors, were lots of lines like this last one: “go: finding GitHub - mattn/go-runewidth: wcwidth for golang v0.0.4” including downloading, extracting, finding.
However there was no ipfs-pump in ~go/bin. I finally figured out the binary was “main” so I copied it to ~/go/bin/ipfs-pump and I’m on my way, assuming the 2 now-absent lines don’t cause problems at run time.
Dec 8th:
I had some trouble “sucking” data from source A to destination B, so I am trying a push from source A to destination B.
So far I see no new objects added to destination B, and the command appears to hang. I used 50 workers.
A few minutes later I see ipfs on source A consuming lots of CPU. It’s an 8 core, 32GB RAM system with some SSD storage, and I saw one CPU peak at over 600%, however the ipfs-pump process never shows much cpu at all it stays pretty much at zero.
Not sure how to gauge progress.
netstat -tupn | grep on destination shows an entry:
tcp 0 0 <dest IP>:5001 <source IP>:41182 CLOSE_WAIT 25177/ipfs
and it’s been in that state for quite awhile.
I returned to the ipfs-pump screen an hour or so later and see this:
$ ipfs-pump \
apipin --enum-api-pin-url=127.0.0.1:5001 --enum-api-pin-stream \
api --coll-api-url=127.0.0.1:5001 \
api --drain-api-url=<dest IP>:5001 \
--worker=50
1s 0 / ? [------------------------------------------------------------------------------------------------------------------------------------------------------------------=]2019/12/08 09:57:13 <nil>
z 1s 1 / ? [---------------------------------------------------------------------------------------------------------------------------------------------------------=] 0/s 1s
$
The process seems to have died, perhaps a run time error due to the 2 lines of code I cut so it would compile.
I ran go build pump_test.go
and after the downloading/extracting phase it reported: no packages to build. There was no executable produced.