mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add dbonly to dump filename
This commit is contained in:
1 file changed
+2
-1
@@ -61,7 +61,8 @@ export function register(cli: CAC) {
|
|||||||
'--excludeCollection=opcount', '--excludeCollection=event',
|
'--excludeCollection=opcount', '--excludeCollection=event',
|
||||||
...(argv.options.withLogs ? [] : ['--excludeCollection=oplog']),
|
...(argv.options.withLogs ? [] : ['--excludeCollection=oplog']),
|
||||||
], { stdio: 'inherit' });
|
], { stdio: 'inherit' });
|
||||||
const target = `${process.cwd()}/backup-${new Date().toISOString().replace(':', '-').split(':')[0]}.zip`;
|
const timestamp = new Date().toISOString().replace(':', '-').split(':')[0];
|
||||||
|
const target = `${process.cwd()}/backup-${timestamp}${argv.options.dbOnly ? '-db-only' : ''}.zip`;
|
||||||
const filesToAdd = [];
|
const filesToAdd = [];
|
||||||
const filesToRemove = [];
|
const filesToRemove = [];
|
||||||
const addFile = argv.options.r
|
const addFile = argv.options.r
|
||||||
|
|||||||
Reference in new issue
Block a user