https://github.com/actalog/mongodump
🍃 GitHub Action for creating a binary export of a database's contents
https://github.com/actalog/mongodump
actions backup database github-actions mongodb mongodump security
Last synced: 4 months ago
JSON representation
🍃 GitHub Action for creating a binary export of a database's contents
- Host: GitHub
- URL: https://github.com/actalog/mongodump
- Owner: actalog
- License: unlicense
- Created: 2023-05-26T03:03:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T13:53:31.000Z (over 1 year ago)
- Last Synced: 2026-02-25T00:19:49.254Z (4 months ago)
- Topics: actions, backup, database, github-actions, mongodb, mongodump, security
- Language: Shell
- Homepage: https://github.com/marketplace/actions/actalog-mongodump
- Size: 22.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @actalog/mongodump
[](https://github.com/actalog/mongodump/actions/workflows/ci.yml)
[](https://github.com/actalog/mongodump/actions/workflows/cd.yml)
A GitHub Action to create MongoDB backups efficiently and securely, using `mongodump` with password-protected compression.
## Features
- 🛡️ **Secure Backups**: Password-protected compressed backups for enhanced data security.
- 🔄 **Simple Automation**: Automatically generate backups during CI/CD pipelines.
- 🚀 **Docker-Based**: Lightweight and easy to use.
- 📦 **Compatible with MongoDB 6**.
---
## Usage
### 1. Workflow Configuration
Add this Action to your GitHub workflow in the `.github/workflows/workflow.yml` file:
```yaml
name: Backup
on:
schedule:
- cron: 0 0 * * *
jobs:
mongodump:
name: Mongodump
runs-on: ubuntu-latest
steps:
- uses: actalog/mongodump@v2
with:
connection-string: ${{ secrets.CONNECTION_STRING }}
output-password: ${{ secrets.OUTPUT_PASSWORD }}
- uses: actions/upload-artifact@v4
with:
name: dump
path: ${{ github.workspace }}/dump
```
### 2. Action Inputs
| Parameter | Required | Description |
|---------------------|----------|-----------------------------------------------------|
| `connection-string` | Yes | MongoDB connection URI (stored as a secret). |
| `output-password` | Yes | Password to protect the backup file. |
### 3. Setting Up Secrets
Add the following secrets to your GitHub repository:
1. **`CONNECTION_STRING`**: The connection URI for your MongoDB instance.
2. **`OUTPUT_PASSWORD`**: The password to secure the backup file.
---
## License
This project is licensed under the terms of [The Unlicense](./LICENSE).