Skip to content
database

GitHub Action

Mongodump & Mongorestore action

v1.4.1 Latest version

Mongodump & Mongorestore action

database

Mongodump & Mongorestore action

GitHub action to run mongodump/mongorestore commands

Installation

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

              

- name: Mongodump & Mongorestore action

uses: zahornyak/[email protected]

Learn more about this action in zahornyak/mongodump-action

Choose a version

Mongodump Action

GitHub Action for creating a MongoDB dump using mongodump or restoring a MongoDB dump using mongorestore.

Example usage

name: Dump MongoDB

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

jobs:
  backup:
    runs-on: ubuntu-latest
    steps:
      - uses: zahornyak/[email protected]
        with:
          connection-string: ${{ secrets.MONGO_URI }}
          compress: true
          mongo-command: mongodump # this is by default. You can use `mongorestore` also here
          additional-args: '--tlsInsecure'