core: add dbonly to dump filename

This commit is contained in:
undefined committed 2025-12-23 01:13:16 +08:00
1 parent 994132e51e
commit aab2c47333
1 file changed
+2 -1
+2 -1
View File
@@ -61,7 +61,8 @@ export function register(cli: CAC) {
'--excludeCollection=opcount', '--excludeCollection=event',
...(argv.options.withLogs ? [] : ['--excludeCollection=oplog']),
], { 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 filesToRemove = [];
const addFile = argv.options.r