mongobackupcloud
v1.0.11
Published
```javascript
Downloads
2
Readme
Usage example
const Mongodb = require('mongobackupcloud');
const credentials = {
CLIENT_ID: "", //the client id of the google drive API , visit https://console.cloud.google.com/
CLIENT_SECRET: "", //the client secret of the google drive API , visit https://console.cloud.google.com/
REFRESH_TOKEN: "",// Visit https://developers.google.com/oauthplayground to get the refresh token from the CLIENT_ID and the CLIENT_SECRET
FOLDER_ID: "", //the google drive folder id, example : https://drive.google.com/drive/folders/xxxxxxxxxxx [xxxxxxxxxxx] is the folder id
DATA_OUTPUT_DIRECTORY: "./data",//The directory which the backup zip files are created. defaults to "./data"
MONGO_DB_URI: "mongodb://localhost:27017" // Mongodb connection URL. defaults to mongodb://localhost:27017
};
const client = new Mongodb(credentials);
//specify the backup time in minutes
//in this case a backup will be taken of the database and uploaded to google drive
//every 5 mins
client.startBackUp(5)