We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 523d899 commit fb772a5Copy full SHA for fb772a5
1 file changed
api/src/dump.ts
@@ -57,11 +57,10 @@ export const dump = async (dumpKey: string, _name?: string) => {
57
const mongoUrl = new URL(config.mongo.url)
58
mongoUrl.searchParams.set('readPreference', config.mongo.readPreference)
59
mongoUrl.pathname = '/' + db
60
- let cmd = `mongodump --gzip --archive=${tmpPath}`
+ let cmd = `mongodump --uri "${mongoUrl.href}" --gzip --archive=${tmpPath}`
61
if (config.mongo.dumpParams && config.mongo.dumpParams[db]) {
62
cmd += ` ${config.mongo.dumpParams[db]}`
63
}
64
- cmd += ` --uri ${mongoUrl.href}`
65
await exec(config.mongo.cmdTmpl.replace('CMD', cmd))
66
debug('dump finished, split archive')
67
await splitArchive({ tmpPath, name: `mongo-${db}.gz` }, name)
0 commit comments