README
dropbox-backup-jsnbt
a backup-dropbox processor for jsnbt installations
overview
This module comes as a plugin to the dropbox-backup, to backup the database and the files of jsnbt installations
usage
var DropboxBackup = require('dropbox-backup')
var JsnbtBackupProcessor = require('dropbox-backup-jsnbt')
var backup = new DropboxBackup({
key: "DROPBOXKEY",
secret: "DROPBOXSECRET",
token: "DROPBOXTOKEN"
})
backup.use(new JsnbtBackupProcessor({
files: [{
name: 'files',
path: './www/public/files'
}],
database: {
name: 'dbname',
host: 'localhost',
port: 27017
}
}))
// upload the backup to the daily/weekly/monthly folders
backup.run(function (x) {
x.upload(function (err, res){
if (err) {
throw err
}
})
})
// or upload a single backup as test.zip
backup.run('test', function (x) {
x.upload(function (err, res){
if (err) {
throw err
}
})
})
copyright and license
Code and documentation copyright 2016 akon. Code released under the MIT license.