Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
database

GitHub Action

Mongodump Action

v1.0.1

Mongodump Action

database

Mongodump Action

GitHub Action for creating a binary export of a database's contents

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Mongodump Action

uses: gabrielrufino/[email protected]

Learn more about this action in gabrielrufino/mongodump-action

Choose a version

Mongodump Action

GitHub Action for creating a binary export of a database's contents

Example usage

name: Backup

on:
  schedule:
    - cron: 0 0 * * *

jobs:
  backup:
    runs-on: ubuntu-latest
    steps:
      - uses: gabrielrufino/mongodump-action
        with:
          connection-string: ${{ secrets.MONGO_URI }}
      - uses: actions/upload-artifact@v3
        with:
          name: dump
          path: ${{ github.workspace }}/dump

Security

Remember that artifacts can be downloaded by anyone who has the artifact download link or access to the workflow run. Which means that you need to use a private repository if you want create backups and upload them as artifacts.