https://github.com/graphprotocol/ipfs-mgm
IPFS cli for content syncing
https://github.com/graphprotocol/ipfs-mgm
Last synced: 10 months ago
JSON representation
IPFS cli for content syncing
- Host: GitHub
- URL: https://github.com/graphprotocol/ipfs-mgm
- Owner: graphprotocol
- Created: 2023-09-18T10:28:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T20:38:52.000Z (over 1 year ago)
- Last Synced: 2025-04-01T23:18:13.458Z (10 months ago)
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 3
- Watchers: 10
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ipfs-mgm
Script to manage the IPFS files. It can be used to sync the CID's between two nodes
## Install
### Manually
```bash
go install cmd/cli/ipfs-mgm.go
```
## Usage
#### View help:
```bash
ipfs-mgm
```
or
```bash
ipfs-mgm --help
```
##### View subcommand help:
```bash
ipfs-mgm sync --help
```
#### Transfer all files from one IPFS node to another:
```bash
ipfs-mgm sync -s -d
```
#### Transfer only specific files from one IPFS node to another:
```bash
ipfs-mgm sync -s -d -f
```
In this case, has to be a file with one IPFS hash per line for each file that should be synced from the `-s` node to the `-d` node.
*Example*:
```text
QmZaHasmzsb1ReQHpCLUoXqqWchTgBrtRvbg7TqsUZXSuU
bafkreib47hfjivabsgaly3mupfqjvdywygfwnnoizlwg7wj2we3yh4t6fe
QmbyzKCFE6d22vnRVekN2Z5PT8Ha1g3TSku8UH5KBp2cTY
QmfNueFQg19hyBtCRUPJRpxVtdwtp8cgWpuRoQpRP3n9st
```
## Docker
The easiest way is to use the built docker image
```bash
docker run -it ghcr.io/graphprotocol/ipfs-mgm sync --help
```
## TODO:
- [ ] Implement async calls by creating a worker queue in batches
- [ ] Check for exisging IPFS files on destination to not try to sync twice. It's not critical due to IPFS immutability but critical to decrease the load
- [ ] Control the sync batches with a pause between them to decrease the load on destination
- [x] Add directory support for sync operation