mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-08-05 19:29:40 +02:00
feat(backup): add backup dir path configure
This commit is contained in:
4
config/env/torrents.js
vendored
4
config/env/torrents.js
vendored
@@ -29,7 +29,9 @@ module.exports = {
|
||||
* at midnight every day.
|
||||
*/
|
||||
backup: {
|
||||
enable: true
|
||||
enable: true,
|
||||
dir: './modules/core/client/backup/'
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,7 +94,7 @@ function cronJobBackupMongoDB() {
|
||||
backup({
|
||||
uri: config.db.uri, // mongodb://<dbuser>:<dbpassword>@<dbdomain>.mongolab.com:<dbport>/<dbdatabase>
|
||||
options: config.db.options || {},
|
||||
root: './modules/core/client/backup/',
|
||||
root: backupConfig.dir,
|
||||
parser: 'json',
|
||||
tar: appConfig.name + '-backup-' + moment().format('YYYYMMDD-HHmmss') + '.tar'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user