Skip to content

Commit

Permalink
More 🐇
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Nov 15, 2024
1 parent e356d5a commit d25bb8d
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions deploy/docker/fs/opt/appsmith/utils/bin/import_db.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ const Constants = require('./constants');
const utils = require('./utils');

async function importDatabase() {
console.log('import_database ....')
await utils.execCommand([
"mongorestore",
"--uri=" + utils.getDburl(),
"--drop",
`--archive=${Constants.RESTORE_PATH}/${Constants.DUMP_FILE_NAME}`,
"--gzip",
]);
console.log('import_database done')
console.log("import_database ....");
try {
await utils.execCommand([
"mongorestore",
"--uri=" + utils.getDburl(),
"--drop",
`--archive=${Constants.RESTORE_PATH}/${Constants.DUMP_FILE_NAME}`,
"--gzip",
]);
} catch (error) {
console.error("Database import failed:", error);
throw error;
}
console.log("import_database done");
}

// Main application workflow
Expand Down

0 comments on commit d25bb8d

Please sign in to comment.