aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-09 20:13:15 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-09 20:13:15 -0500
commit384d67abbba7eeb0e21855f1446bbc41b251ead1 (patch)
tree70a94857ba3fdcbd8b1413d63a3f7b553dbc9c83
parent0fedfcd711a31463df3d9ae6e22e984032139324 (diff)
complete instructions for debugging
-rw-r--r--src/server/DashSession.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/DashSession.ts b/src/server/DashSession.ts
index 9bcf8ba98..11a5f1925 100644
--- a/src/server/DashSession.ts
+++ b/src/server/DashSession.ts
@@ -91,8 +91,18 @@ export class DashSessionAgent extends Session.AppliedSessionAgent {
zip.pipe(output);
zip.directory(`${backupsDirectory}/${target}/Dash`, false);
await zip.finalize();
- monitor.mainLog(`zip finalized, saved to ${zipPath}`);
- const error = await Email.dispatch(recipient, `Compressed backup of ${target}...`, "mongorestore, etc.", [
+ monitor.mainLog(`zip finalized with size ${statSync(zipPath).size}, saved to ${zipPath}`);
+ const instructions = [
+ `Instructions:\n\nDownload this attachment, open your downloads folder and find this file (${zipName}).`,
+ `Right click on the zip file and select 'Extract to ${target}/'.`,
+ "From the mongodb bin directory (unless it's in your path), run the following command:\n",
+ "mongorestore --gzip [/path/to/directory/you/just/unzipped] --db Dash.\n",
+ "You can get that path by literally dragging the directory from the file system and dropping it onto the terminal.",
+ "Assuming everything runs well, this will mirror your local database with that of the server.",
+ "Now, just start the server locally and debug.\n",
+ this.signature
+ ].join("\n");
+ const error = await Email.dispatch(recipient, `Compressed backup of ${target}...`, instructions, [
{
filename: zipName,
path: zipPath