Fixed issues

This commit is contained in:
2025-10-22 15:57:05 +00:00
parent 77b87485b0
commit a53a424399

View File

@@ -9,17 +9,11 @@ main:
# Backrest Docker Stop
---
[Backrest](https://github.com/garethgeorge/backrest) is a fantastic backup tool.
In the case of [Serveex](https://docu.djeex.fr/serveex/introduction), most of the data that needs to be backed up consists of containers — and those containers often include databases.
The problem? You cant safely back up a database while its running.
[Backrest](https://github.com/garethgeorge/backrest) is a fantastic backup tool. In the case of [Serveex](https://docu.djeex.fr/serveex/introduction), most of the data that needs to be backed up consists of containers, and those containers often include databases.
There are plenty of complex solutions involving database dumps, but often the simplest method is to stop the containers, perform the backup, and then restart them.
The problem? You cant safely back up a database while its running. There are plenty of complex solutions involving database dumps, but often the simplest method is to stop the containers, perform the backup, and then restart them.
**Backrest** doesnt natively provide this functionality, but it does allow the execution of custom scripts triggered by events for example, at the start and end of a backup plan.
Our goal is to stop the containers whose databases need to be backed up when the backup plan starts, and restart them when the backup plan finishes.
To achieve this, well need a small Bash script and a secure connection between Backrest and the Docker socket, to enable the following sequence:
**Backrest** doesnt natively provide this functionality, but it does allow the execution of custom scripts triggered by events, for example, at the start and end of a backup plan. Our goal is to stop the containers whose databases need to be backed up when the backup plan starts, and restart them when the backup plan finishes.To achieve this, well need a small Bash script and a secure connection between Backrest and the Docker socket, to enable the following sequence:
- The backup plan starts
- The event triggers the execution of a custom script
@@ -29,7 +23,6 @@ To achieve this, well need a small Bash script and a secure connection betwee
- The event triggers another custom script
- The script contacts Docker again, retrieves the same list, and restarts those containers
---
## Securely Connecting Backrest and Docker
@@ -76,7 +69,6 @@ services:
With this setup, Backrest can communicate with Docker safely and securely.
---
## The Scripts
@@ -106,8 +98,8 @@ do
done
sleep 10
```
::
---
## The Label