File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ export class BackupService {
8585 try {
8686 cd ( tempDirPath )
8787 await $ `unzip backup.zip`
88- await $ `mongorestore -h ${ process . env . DB_URL || '127.0.0.1' } -d ${
89- MONGO_DB . collectionName
90- } ./mx-space --drop >/dev/null 2>&1`
88+ await $ `mongorestore -h ${ MONGO_DB . host || '127.0.0.1' } --port ${
89+ MONGO_DB . port || 27017
90+ } -d ${ MONGO_DB . collectionName } ./mx-space --drop >/dev/null 2>&1`
9191
9292 this . logger . debug ( '恢复成功' )
9393 await this . adminGateway . broadcast (
@@ -118,9 +118,9 @@ export class BackupService {
118118 }
119119
120120 cd ( dirPath )
121- await $ `mongorestore -h ${ process . env . DB_URL || '127.0.0.1' } -d ${
122- MONGO_DB . collectionName
123- } ./mx-space --drop >/dev/null 2>&1`
121+ await $ `mongorestore -h ${ MONGO_DB . host || '127.0.0.1' } --port ${
122+ MONGO_DB . port || 27017
123+ } -d ${ MONGO_DB . collectionName } ./mx-space --drop >/dev/null 2>&1`
124124 } catch ( e ) {
125125 this . logger . error ( e )
126126 throw e
You can’t perform that action at this time.
0 commit comments