iridium_mongodb_backup

1.0.3 • Public • Published

MongoDB Backup with AWS S3

Installation
npm install iridium_mongodb_backup
Configuration
var db_backup = require('iridium_mongodb_backup');

db_backup.config({
     db: '<Database Name>', // Required
     output: '<Output to local Directory>', // Required
     dir_prefix: '<Directory prefix>', // Optional
     deleteLocal: true | false,
     s3Upload: true | false, // Default: false, Optional
     accessKeyId: '<AWS accessKeyId>',
     secretAccessKey: '<AWS secretAccessKey>',
     bucket: '<AWS Bucket name>',
     region: '<AWS Bucket Region Name>',
     debug: true | false // Default: true, Optional
    
 });
Run Manually
db_backup.run();
Schedule
db_backup.schedule('<Schdule>');

We use node-cron to run cron jobs, This is a quick reference to cron syntax and also shows the options supported by node-cron.

Allowed fields
 # ┌────────────── second (optional)
 # │ ┌──────────── minute
 # │ │ ┌────────── hour
 # │ │ │ ┌──────── day of month
 # │ │ │ │ ┌────── month
 # │ │ │ │ │ ┌──── day of week
 # │ │ │ │ │ │
 # │ │ │ │ │ │
 # * * * * * *

Allowed values

field value
second 0-59
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names)
day of week 0-7 (or names, 0 or 7 are sunday)

Readme

Keywords

none

Package Sidebar

Install

npm i iridium_mongodb_backup

Weekly Downloads

0

Version

1.0.3

License

ISC

Last publish

Collaborators

  • iridiumsoft