Skip to content

Commit b003bd8

Browse files
authored
Merge pull request #1566 from hashtopolis/doc/clean-install
Adding some documentation extensions
2 parents 2eddaa8 + f9d5a8c commit b003bd8

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

doc/installation_guidelines/advanced_install.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,43 @@ docker compose down
221221
docker compose up
222222
```
223223

224-
Finally, copy the data back into the appropriate folders after recreating the containers.
224+
Finally, copy the data back into the appropriate folders after recreating the containers.
225+
226+
## Backup and Restore
227+
228+
What the best way to backup and restore your hashtopolis instance depends heavily on the way the instance is set up and what configurations are made.
229+
Therefore, there is no guide available for backing up / restoring which works for everyone, but some considerations which need to be taken into account:
230+
231+
- Depending on the amount of data (files, database size, etc.) in the hashtopolis instance, a complete backup can become quite large. If it is needed to just be able to restore information about executed tasks, progress etc. (e.g. in case of a fatal failure of the system) it is enough to just back up the database, but of course this would not allow a easy restore to a previous state.
232+
- If you plan to do a backup in a way to be able to completely restore it to the previous state (files, logs, database, users, etc.), you need to be careful to include all required items into your backup and when restoring make sure that nothing gets left out during that process, otherwise you may end up with a semi-broken or non-functional hashtopolis instance.
233+
- In case you have set up your hashtopolis instance only using volumes (one for the database, one for all the hashtopolis data), backup up the complete content of these volumes is enough to have all data backed up.
234+
- Restoring only parts (some tasks, only users, other database parts) from a backup is very tricky and should only be done by experts and very easily goes wrong when primary keys are not sequential and not updated for auto increment in the database.
235+
236+
## Set up a fresh and clean instance
237+
238+
When there is the need for a complete reset/clean setup (e.g. for testing), you can do following steps to completely remove all data.
239+
240+
> [!CAUTION]
241+
> The following steps will delete all data in your hashtopolis instance (including the database, users, tasks, agents, etc.)!
242+
243+
These steps assume that you have set up your hashtopolis instance using a `docker-compose.yml` file.
244+
245+
First stop all running all containers and clean them up:
246+
247+
```
248+
cd <directory-containing-docker-compose.yml>
249+
docker compose down
250+
```
251+
252+
In case you have mounted directories for files and other data instead of using a docker volume, clean these directories by removing all files within (wordlists, rules, etc.).
253+
254+
Delete the docker volumes for the database and hashtopolis data (if you don't have the folders mounted otherwise).
255+
Use `docker volume ls` to determine which volumes exist (typically they are prefixed with the name of the folder containing the `docker-compose.yml`).
256+
257+
For each of the relevant volume, delete it by using `docker volume rm <volume-name>`.
258+
259+
Afterwards, you can start up the containers again which should then be in a complete clean state and a freshly set up instance:
260+
261+
```
262+
docker compose up -d
263+
```

doc/installation_guidelines/basic_install.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ docker compose up --detach
5353

5454

5555
## Agent installation
56+
5657
### Prerequisites
58+
5759
To install the agent, ensure that the following prerequisites are met:
5860

5961
1. Python: Python 3 must be installed on the agent system. If Python 3 is not installed, refer to the official Python installation guide. You can verify the installation by running the following command in your terminal:
@@ -80,13 +82,20 @@ pip install requests psutil
8082
```
8183

8284
### Download the Hashtopolis agent
85+
8386
1. Connect to the Hashtopolis server: ```http://<server-ip-address>:8080``` and log in. Navigate to the page *Agents > Show Agents* and click on the button *'+ New Agent'*.
8487
2. On that page you can click on "..." and choose to download the agent binary or copy the URL of the agent binary and download the agent using wget/curl:
8588

8689
```
8790
curl -o hashtopolis.zip "http://<server-ip-address>:8080/agents.php?download=1"
8891
```
8992

93+
or
94+
95+
```
96+
wget --content-disposition "http://<server-ip-address>:8080/agents.php?download=1"
97+
```
98+
9099
### Start and register a new agent
91100

92101
1. Activate your python virtual environment if not done before:

0 commit comments

Comments
 (0)