Files
duplicati/docker/mysqlclient/README.md
2023-06-10 08:57:16 +01:00

72 lines
1.9 KiB
Markdown

# Duplicati / mySql Client
```bash
#Executed on repository root folder
docker build -t duplicati-mysqlclient:latest -f docker/mysqlclient/Dockerfile .
```
```bash
#Executed on repository root folder
sudo docker build -t duplicati-mysqlclient:latest -f docker/mysqlclient/Dockerfile --output type=tar,dest=build/duplicati-mysqlclient.tar .
```
## Portainer
Images -> Build a new Image -> URL
**Name:** duplicati-mysqlclient:latest
**URL:** https://git.limbosolutions.com/kb/duplicati.git
**Dockerfile path:** docker/mysqlclient/Dockerfile
## Docker Compose
```yaml
version: "3"
services:
duplicati:
image: duplicati-mysqlclient
environment:
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- INFLUXDB_SERVER=${INFLUXDB_SERVER}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
volumes:
- duplicati-data:/data
- db-dumps:/db-dumps
ports:
- 8200:8200
restart: unless-stopped
volumes:
duplicati-data:
db-dumps:
```
### Transfer To another system
1. Copy docker compose and execute on another system
2. Check volumes and service started succesfully
3. Stop all compose services
4. Change volume on duplicati service to user a temporary volume example (duclicati_tmpdata)
5. Check if all volumes are writable on duplication service
6. Start only the duplicati service (with temporary volume) on target system
7. On source system Stop app services on docker compose except duplicati
8. Execute a full backup ou source system
9. On target system execute a manual restore to original destination
10. Stop duplicati
11. Change duplicati to use original volume
12. And change volumes on duplicati to RO
13. Start all services
14. Check everything ok