Skip to content

Repository files navigation

hammer

A Rust CLI to back up MongoDB databases into a zip archive and optionally upload the archive to S3.

Docs

Building

make build

Running

Backup

hammer backup --connection mongodb://localhost:27017 --database hammer --upload

Restore

hammer restore --folder /path/to/your/folder --connection mongodb://localhost:27017 --database example
hammer restore --archive /path/to/backup.zip --connection mongodb://localhost:27017 --database example

Example of use

Backup

AWS_ACCESS_KEY_ID=example AWS_SECRET_ACCESS_KEY=example AWS_REGION=us-east-1 AWS_BUCKET=example target/release/hammer backup --connection mongodb://localhost:27017 --database example --upload

Restore

target/release/hammer restore --folder /path/to/your/folder --connection mongodb://localhost:27017 --database example

Restore from archive

target/release/hammer restore --archive /path/to/backup.zip --connection mongodb://localhost:27017 --database example

Development

make fmt
make test
make check

About

Rust CLI that backs up and restores MongoDB databases as zip archives, with optional upload to AWS S3.

Topics

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages