“Mongo DB Backup Node JS Daily” Kode Jawaban

Mongo DB Backup Node JS Daily

spawn = require('child_process').spawn
let backupProcess = spawn('mongodump', [
    '--db=restaurantDB',
    '--archive=.',
    '--gzip'
    ]);

backupProcess.on('exit', (code, signal) => {
    if(code) 
        console.log('Backup process exited with code ', code);
    else if (signal)
        console.error('Backup process was killed with singal ', signal);
    else 
        console.log('Successfully backedup the database')
});
Said HR

Mongo DB Backup Node JS Daily

mongodump --db=yourDatabaseName --archive=pathToStoreBackup/ --gzip
Said HR

Jawaban yang mirip dengan “Mongo DB Backup Node JS Daily”

Pertanyaan yang mirip dengan “Mongo DB Backup Node JS Daily”

Lebih banyak jawaban terkait untuk “Mongo DB Backup Node JS Daily” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya