This commit is contained in:
30
.gitea/workflows/docker-image.deploy.yml
Normal file
30
.gitea/workflows/docker-image.deploy.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "docker/**"
|
||||||
|
- ".gitea/**"
|
||||||
|
- ".scripts/**"
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build-docker-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Log in to git.limbosolutions.com docker registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.limbosolutions.com
|
||||||
|
username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push Docker images
|
||||||
|
id: push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ${{gitea.workspace}}/docker
|
||||||
|
push: true
|
||||||
|
tags: git.limbosolutions.com/kb/duplicati:mysql-latest
|
||||||
24
README.md
24
README.md
@@ -1,5 +1,19 @@
|
|||||||
# Duplicati
|
# Duplicati
|
||||||
|
|
||||||
|
- [Docker](#docker)
|
||||||
|
- [Duplicati/mySql Client - image](#duplicatimysql-client---image)
|
||||||
|
- [Scripts](#scripts)
|
||||||
|
- [Backup mySql Database](#backup-mysql-database)
|
||||||
|
- [Influxdb Reporting](#influxdb-reporting)
|
||||||
|
- [Docker log](#docker-log)
|
||||||
|
- [Environment Variables](#environment-variables)
|
||||||
|
- [Exit Codes](#exit-codes)
|
||||||
|
- [cli](#cli)
|
||||||
|
- [Send Mail](#send-mail)
|
||||||
|
- [Settings](#settings)
|
||||||
|
- [Send Email](#send-email)
|
||||||
|
- [nginx](#nginx)
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
### Duplicati/mySql Client - image
|
### Duplicati/mySql Client - image
|
||||||
@@ -8,14 +22,12 @@ Image contains all scripts
|
|||||||
|
|
||||||
[+ Information](docker/mysqlclient/README.md)
|
[+ Information](docker/mysqlclient/README.md)
|
||||||
|
|
||||||
|
|
||||||
## Scripts
|
## Scripts
|
||||||
|
|
||||||
_Source: https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.sh_
|
_Source: https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.sh_
|
||||||
|
|
||||||
### Backup mySql Database
|
### Backup mySql Database
|
||||||
|
|
||||||
|
|
||||||
Using option run-script-before-required on duplicati job set value to [script](scripts/duplicati-mysql-backup).
|
Using option run-script-before-required on duplicati job set value to [script](scripts/duplicati-mysql-backup).
|
||||||
And job will create a database dump configured using environment variables.
|
And job will create a database dump configured using environment variables.
|
||||||
Example:
|
Example:
|
||||||
@@ -49,16 +61,13 @@ Add [script](scripts/duplicati-influxdb-notify) to default settings.
|
|||||||
Example:
|
Example:
|
||||||
--run-script-after=duplicati-influxdb-notify
|
--run-script-after=duplicati-influxdb-notify
|
||||||
|
|
||||||
|
|
||||||
### Docker log
|
### Docker log
|
||||||
|
|
||||||
`
|
|
||||||
Add [script](docker/scripts/dockerlog) to default settings.
|
Add [script](docker/scripts/dockerlog) to default settings.
|
||||||
Example:
|
Example:
|
||||||
--run-script-after=dockerlog
|
--run-script-after=dockerlog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
Source: https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.sh_
|
Source: https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.sh_
|
||||||
@@ -89,7 +98,6 @@ Source: https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Mod
|
|||||||
|
|
||||||
### Exit Codes
|
### Exit Codes
|
||||||
|
|
||||||
|
|
||||||
The following exit codes are supported:
|
The following exit codes are supported:
|
||||||
|
|
||||||
- 0: OK, run operation
|
- 0: OK, run operation
|
||||||
@@ -100,7 +108,6 @@ The following exit codes are supported:
|
|||||||
- 5: Error don't run operation
|
- 5: Error don't run operation
|
||||||
- other: Error don't run operation
|
- other: Error don't run operation
|
||||||
|
|
||||||
|
|
||||||
## cli
|
## cli
|
||||||
|
|
||||||
## Send Mail
|
## Send Mail
|
||||||
@@ -110,7 +117,6 @@ The following exit codes are supported:
|
|||||||
duplicati-cli send-mail --send-mail-password="pass" --send-mail-to="target@mail.lan" --send-mail-username="suer@mail.lan" --send-mail-url="smtp://serveraddress:25"
|
duplicati-cli send-mail --send-mail-password="pass" --send-mail-to="target@mail.lan" --send-mail-username="suer@mail.lan" --send-mail-url="smtp://serveraddress:25"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
### Send Email
|
### Send Email
|
||||||
|
|||||||
@@ -1,30 +1,8 @@
|
|||||||
# Duplicati / mySql Client
|
# Duplicati / mySql Client
|
||||||
|
|
||||||
```bash
|
- [Docker Compose](#docker-compose)
|
||||||
|
- [Development](#development)
|
||||||
#Executed on repository root folder
|
- [Docker Build](#docker-build)
|
||||||
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
|
## Docker Compose
|
||||||
|
|
||||||
@@ -32,7 +10,7 @@ Images -> Build a new Image -> URL
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
duplicati:
|
duplicati:
|
||||||
image: duplicati-mysqlclient
|
image: git.limbosolutions.com/kb/duplicati:mysql-latest
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=${MYSQL_HOST}
|
- MYSQL_HOST=${MYSQL_HOST}
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
@@ -54,19 +32,12 @@ volumes:
|
|||||||
db-dumps:
|
db-dumps:
|
||||||
```
|
```
|
||||||
|
|
||||||
### Transfer To another system
|
## Development
|
||||||
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
|
|
||||||
|
|
||||||
|
### Docker Build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
|
||||||
|
#Executed on repository root folder
|
||||||
|
docker build -t duplicati-mysqlclient:latest -f docker/mysqlclient/Dockerfile .
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user