From 8b93b45545f2476be1b5e5d8ac6f347803a77ac5 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Thu, 21 Oct 2021 14:56:27 +0530 Subject: [PATCH 1/3] Docs: Add FAQ for data dir deletion and backup on installing new version --- docs/content/FAQ/_index.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/content/FAQ/_index.md b/docs/content/FAQ/_index.md index ef25cc4f7..cf8e2c30a 100644 --- a/docs/content/FAQ/_index.md +++ b/docs/content/FAQ/_index.md @@ -8,6 +8,8 @@ pre: " " Below are some of the most common questions we receive about the Infection Monkey. If the answer you're looking for isn't here, talk with us [on our Slack channel](https://infectionmonkey.slack.com/join/shared_invite/enQtNDU5MjAxMjg1MjU1LWM0NjVmNWE2ZTMzYzAxOWJiYmMxMzU0NWU3NmUxYjcyNjk0YWY2MDkwODk4NGMyNDU4NzA4MDljOWNmZWViNDU), email us at [support@infectionmonkey.com](mailto:support@infectionmonkey.com) or [open an issue on GitHub](https://github.com/guardicore/monkey). - [Where can I get the latest version of the Infection Monkey?](#where-can-i-get-the-latest-version-of-the-infection-monkey) +- [I updated to a new version of the Infection Monkey and I'm being asked to delete my existing data directory. Why?](#i-updated-to-a-new-version-of-the-infection-monkey-and-im-being-asked-to-delete-my-existing-data-directory-why) +- [How can I use an old data directory?](#how-can-i-use-an-old-data-directory) - [How long does a single Infection Monkey agent run? Is there a time limit?](#how-long-does-a-single-infection-monkey-agent-run-is-there-a-time-limit) - [Is the Infection Monkey a malware/virus?](#is-the-infection-monkey-a-malwarevirus) - [Reset/enable the Monkey Island password](#resetenable-the-monkey-island-password) @@ -35,6 +37,24 @@ For the latest **stable** release, visit [our downloads page](https://www.guardi If you want to see what has changed between versions, refer to the [releases page on GitHub](https://github.com/guardicore/monkey/releases). For the latest development version, visit the [develop version on GitHub](https://github.com/guardicore/monkey/tree/develop). +## I updated to a new version of the Infection Monkey and I'm being asked to delete my existing data directory. Why? + +The [data directory]({{< ref "/reference/data_directory" >}}) contains the +Infection Monkey's database and other internal +data. For the new version of Infection Monkey to work flawlessly, a data +directory with a compatible structure needs to be set up. + +If you would like to save the data gathered from the Monkey's previous runs, +you can make a backup of your [existing data directory]({{< ref +"/reference/data_directory" >}}) before deleting it. + +## How can I use an old data directory? + +To use the data stored in a data directory from an older version, reinstall the +version of the Monkey Island which matches your data directory's version. Then, +copy the backup of your old data directory to the [appropriate location]({{< +ref "/reference/data_directory" >}}). + ## How long does a single Infection Monkey agent run? Is there a time limit? The Infection Monkey agent shuts off either when it can't find new victims or it has exceeded the quota of victims as defined in the configuration. From be04384efe60f3ef255308afe2c6f93d997eae5d Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 21 Oct 2021 08:44:36 -0400 Subject: [PATCH 2/3] Docs: Add instructions to configure data_dir on Linux --- docs/content/reference/data_directory.md | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/content/reference/data_directory.md b/docs/content/reference/data_directory.md index 418c320fa..2ab7ca78e 100644 --- a/docs/content/reference/data_directory.md +++ b/docs/content/reference/data_directory.md @@ -16,3 +16,30 @@ configuration files, etc. On Linux, the default path is `$HOME/.monkey_island`. On Windows, the default path is `%AppData%\monkey_island`. + +## How do I configure the location of the data directory on Linux? + +The location of the data directory is set in the `data_dir` field in the +`server_config.json` file. + +1. Create a custom `server_config.json` file and set the `data_dir` field. Its + contents will look like: + + ```json + { + "log_level": "DEBUG", + "environment": { + "server_config": "password" + }, + "mongodb": { + "start_mongodb": true + }, + "data_dir": "" + } + ``` + +1. Start the Infection Monkey with the `--server-config` parameter. + + ```bash + $ InfectionMonkey-VERSION.AppImage --server-config + ``` From a43c1b0a186fbbc48e9228c40ce4ff8a492aaa83 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 21 Oct 2021 08:52:37 -0400 Subject: [PATCH 3/3] Docs: Add delete data directory tip to Linux and Windows setup --- docs/content/setup/linux.md | 7 +++++++ docs/content/setup/windows.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/docs/content/setup/linux.md b/docs/content/setup/linux.md index 09bf7cac3..7fcd09d24 100644 --- a/docs/content/setup/linux.md +++ b/docs/content/setup/linux.md @@ -36,6 +36,13 @@ installed, but the ones that we've tested are: 1. Access the Monkey Island web UI by pointing your browser at `https://localhost:5000`. +{{% notice info %}} +If you're prompted to delete your data directory and you're not sure what to +do, see the [FAQ]({{< ref +"/faq/#i-updated-to-a-new-version-of-the-infection-monkey-and-im-being-asked-to-delete-my-existing-data-directory-why" +>}}) for more information. +{{% /notice %}} + ### Start Monkey Island with user-provided certificate By default, Infection Monkey comes with a [self-signed SSL diff --git a/docs/content/setup/windows.md b/docs/content/setup/windows.md index 2a055de88..f9fd5acaf 100644 --- a/docs/content/setup/windows.md +++ b/docs/content/setup/windows.md @@ -20,6 +20,13 @@ After running the installer, the following prompt should appear on the screen: 1. Follow the steps to complete the installation. 1. Run the Monkey Island by clicking on the desktop shortcut. +{{% notice info %}} +If you're prompted to delete your data directory and you're not sure what to +do, see the [FAQ]({{< ref +"/faq/#i-updated-to-a-new-version-of-the-infection-monkey-and-im-being-asked-to-delete-my-existing-data-directory-why" +>}}) for more information. +{{% /notice %}} + ### Start Monkey Island with user-provided certificate By default, Infection Monkey comes with a [self-signed SSL certificate](https://aboutssl.org/what-is-self-sign-certificate/). In