This is a tool to generate a snapshot and upload snapshot and addrbook to S3 periodically.
- Upload snapshots to S3
- Maintain only last 2 snapshots.
- Upload
addrbook.jsonto S3- Maintain only last 1
addrbook.json.
- Maintain only last 1
- Efficiently generate snapshot
- Only run a node during snapshot generating so that no need to run node continously.
- Provide a API
/snapshot: Redirect to latest snapshot URL./snapshot/status: Get snapshot status related with/snapshotlink.{ "redirect_url": "https://your-bucket.s3.your-region.amazonaws.com/snapshot_1234500.tar.lz4", "height": 1234500, "time": "2025-01-01T00:00:00.000000000Z" }/addrbook: Redirect to latestaddrbook.jsonURL./addrbook/status: Getaddrbook.jsonstatus related with/addrbooklink.{ "redirect_url": "https://your-bucket.s3.your-region.amazonaws.com/addrbook.json", "height": 1234500, "time": "2025-01-01T00:00:00.000000000Z" }
curl,jq,sed,tar,lz4are required to be installed on the machine.- This node will set up as systemd. (Just setup not need to run)
- AWS S3 bucket has to be configured public access.
- Build
go build- Configure
config.tomlfile
cp config.toml.example config.toml- Run
./snapshot2s3 -config config.toml