From 384d67abbba7eeb0e21855f1446bbc41b251ead1 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Thu, 9 Jan 2020 20:13:15 -0500 Subject: complete instructions for debugging --- src/server/DashSession.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2