https://github.com/nftstorage/backup
***Notice: This repository is no longer maintained.*** A tool to backup all data for disaster recovery.
https://github.com/nftstorage/backup
Last synced: about 1 year ago
JSON representation
***Notice: This repository is no longer maintained.*** A tool to backup all data for disaster recovery.
- Host: GitHub
- URL: https://github.com/nftstorage/backup
- Owner: nftstorage
- Created: 2021-12-15T15:58:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T13:21:29.000Z (about 3 years ago)
- Last Synced: 2025-03-28T07:02:17.633Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 579 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backup
A tool to backup all data for disaster recovery!
## Usage
Drop a `.env` file in the project root and populate:
```sh
DATABASE_CONNECTION=
RO_DATABASE_CONNECTION=
IPFS_ADDRS=
S3_REGION=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_BUCKET_NAME=
REDIS_CONN_STRING= # optional - used to store CIDs that timed out during fetch
```
Replace `DATABASE_CONNECTION` with the connection string for the database you want to write to and `RO_DATABASE_CONNECTION` with the connection string for the database you want to read from, `IPFS_ADDRS` with the multiaddrs of nodes where content can be found and `S3_*` with the relevant S3 bucket details.
Start the backup:
```sh
npm start
# with optional start date:
npm start -- 2021-12-25
```
The tool writes _complete_ CAR files to the S3 bucket to a path like: `complete/.car`. Where `CID` is a normalized, v1 base32 encoded CID.
### Docker
There's a `Dockerfile` that runs the tool in docker.
```sh
docker build -t backup .
docker run -d backup
```