Fixed issues
This commit is contained in:
@@ -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 can’t safely back up a database while it’s 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 can’t safely back up a database while it’s 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** doesn’t 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, we’ll need a small Bash script and a secure connection between Backrest and the Docker socket, to enable the following sequence:
|
||||
**Backrest** doesn’t 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, we’ll 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, we’ll 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user