Skip to content

Commit 6b41466

Browse files
authored
Update instructions (#123)
1 parent 94b4074 commit 6b41466

File tree

2 files changed

+42
-26
lines changed

2 files changed

+42
-26
lines changed

pages/help-center/errors/_meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"auth": "Auth",
3-
"durability": "durability",
3+
"durability": "Durability",
44
"memory": "Memory",
55
"modules": "Modules",
66
"overview": "Overview",

pages/help-center/errors/snapshots.mdx

+41-25
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,47 @@ start Memgraph again.
3434

3535
## Why is data lost when Memgraph is restarted?
3636

37-
<Tabs items={['Docker 🐳', 'Linux']}>
38-
<Tab>
39-
Docker containers don’t persist data by default (all changes are lost when the
40-
container is stopped). You need to use local volumes to store the data
41-
permanently which is why Memgraph is started with the `-v` flags:
42-
43-
```console
44-
docker run -p 7687:7687 -v mg_lib:/var/lib/memgraph memgraph/memgraph
45-
```
46-
47-
More information on Docker Volumes can be found
48-
[here](https://docs.docker.com/storage/volumes/).
49-
</Tab>
50-
<Tab>
51-
52-
Make sure that Memgraph is searching for the snapshot files in the right
53-
directory. The Memgraph configuration is available in
54-
`/etc/memgraph/memgraph.conf` and you can specify the directory with the
55-
`--data-directory` flag. If the configuration file is altered, Memgraph needs to
56-
be restarted. The default directory is `/var/lib/memgraph`. To learn about all
57-
the configuration options, check out the [reference
58-
guide](/configuration/configuration-settings).
59-
60-
</Tab>
61-
</Tabs>
37+
When you stop a Docker container, the data and state within that container are
38+
preserved until the container is explicitly removed. This means that any data or
39+
changes you've made within the container are retained and can be accessed again
40+
when the container is restarted.
41+
42+
To access this data, you need to ensure you're starting the same container
43+
instance that you used previously. Here's how you can do that:
44+
45+
### Starting a Named Container
46+
47+
If you had named your Memgraph container as "memgraph", for instance, you can
48+
easily restart it using the following command:
49+
50+
```
51+
docker start memgraph
52+
```
53+
54+
This command will bring the named container back to life, retaining all the data
55+
and changes you had made in it.
56+
57+
### Starting an Unnamed Container
58+
59+
If you didn't assign a specific name to your container when you created it,
60+
Docker would have given it a random name. To find and restart the correct
61+
container list all the containers on your system using the following command:
62+
63+
```
64+
docker ps -a
65+
```
66+
67+
From the list, identify the container you want to restart. Note down the
68+
container ID associated with it and use it to restart the container:
69+
70+
```
71+
docker start [CONTAINER_ID]
72+
```
73+
74+
Replace `[CONTAINER_ID]` with the actual ID you noted down. Once executed, your
75+
container will be up and running again, with all its data intact.
76+
77+
---
6278

6379
<Callout type="info">
6480
If you weren't able to find the error, please submit it through a <a href="https://support.memgraph.com"

0 commit comments

Comments
 (0)