feat: duplicati backup influxdb trace
This commit is contained in:
37
README.md
37
README.md
@@ -4,47 +4,35 @@ Welcome to public repository of my [Git Server](https://git.limbosolutions.com)
|
|||||||
|
|
||||||
Using [gitea](https://git.limbosolutions.com/kb/gitea) and [duplicati](https://git.limbosolutions.com/kb/duplicati) for backups.
|
Using [gitea](https://git.limbosolutions.com/kb/gitea) and [duplicati](https://git.limbosolutions.com/kb/duplicati) for backups.
|
||||||
|
|
||||||
[Check](doc/administration/README.md) for more information about admistration.
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Docker
|
- Docker
|
||||||
_Currently hosted on an ubuntu lxc container with docker and portainer [+ information](https://git.limbosolutions.com/kb/lxc)._
|
- Docker Compose
|
||||||
|
- Portainer (optional)
|
||||||
- [Duplicati Image with mySql client](https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/mysqlclient/README.md)
|
- [Duplicati Image with mySql client](https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/mysqlclient/README.md)
|
||||||
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
[Docker Compose File](docker-compose.yaml)
|
[Docker Compose File](docker-compose.yaml)
|
||||||
|
|
||||||
## Backup & Restore
|
## Backup and Restore
|
||||||
|
|
||||||
Using [duplicati](https://git.limbosolutions.com/kb/duplicati) to daily backups of files and databases.
|
Using [custom duplicati image](https://git.limbosolutions.com/kb/duplicati) to daily backups files and databases. Every action (backup/restore) creates an measurement in influxdb for reporting and alerts.
|
||||||
|
|
||||||
- Backup Name: git
|
|
||||||
- Destination Server: backupsrv01.dev.lan
|
|
||||||
- Destination Path: /git.limbosolutions.com/duplicati/git
|
|
||||||
- Source Data : /git (check [Docker Compose File](docker-compose.yaml) for folder structure on /git)
|
|
||||||
- Schedule: every day at 1 am
|
|
||||||
- run-script-before-required:/duplicati-mysqlclient/scripts/backupdb.sh
|
|
||||||
|
|
||||||
### Settings
|
### Duplicati - Default Options
|
||||||
|
|
||||||
#### Default Options
|
Notify Influxdb.
|
||||||
|
|
||||||
```bash
|
--run-script-after=duplicati-influxdb-notify
|
||||||
|
|
||||||
--send-mail-any-operation=true
|
### Duplicati - git job Options
|
||||||
--send-mail-body=%RESULT%
|
|
||||||
--send-mail-level=all
|
|
||||||
--send-mail-subject=Duplicati %OPERATIONNAME% report for wiki.limbosolutions.com -> %backup-name%
|
|
||||||
--send-mail-to=to@email
|
|
||||||
--send-http-result-output-format=Duplicati
|
|
||||||
--send-mail-url= smtp://serveraddress:25
|
|
||||||
--send-mail-password=username
|
|
||||||
--send-mail-username=pass
|
|
||||||
|
|
||||||
```
|
Create db dump.
|
||||||
|
|
||||||
|
run-script-before-required:duplicati-mysql-backup
|
||||||
|
|
||||||
### Restore Database
|
### Restore Database
|
||||||
|
|
||||||
@@ -56,3 +44,4 @@ DB_FILE= "file name to import"
|
|||||||
mysql --host db -uroot -p ${MYSQL_DATABASE} < /db-dumps/$DB_FILE
|
mysql --host db -uroot -p ${MYSQL_DATABASE} < /db-dumps/$DB_FILE
|
||||||
#root password (root password is the enviromnent variable ${MYSQL_ROOT_PASSWORD})
|
#root password (root password is the enviromnent variable ${MYSQL_ROOT_PASSWORD})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Administration
|
|
||||||
|
|
||||||
## HomeAssistant DashBoard
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
```yaml
|
|
||||||
type: vertical-stack
|
|
||||||
cards:
|
|
||||||
- type: entities
|
|
||||||
entities:
|
|
||||||
- type: weblink
|
|
||||||
name: Homepage
|
|
||||||
url: http://git.limbosolutions.com
|
|
||||||
- type: weblink
|
|
||||||
name: Backups
|
|
||||||
url: http://wansrv01.dev.lan:8200/
|
|
||||||
- type: weblink
|
|
||||||
name: Hosting
|
|
||||||
url: wansrv01
|
|
||||||
- type: weblink
|
|
||||||
name: Git
|
|
||||||
url: https://git.limbosolutions.com/limbosolutions.com/git.limbosolutions.com
|
|
||||||
title: git.limbosolutions.com
|
|
||||||
```
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
@@ -31,7 +31,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/mysql
|
- db:/var/lib/mysql
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
|
||||||
- db-dumps:/db-dumps:ro
|
- db-dumps:/db-dumps:ro
|
||||||
duplicati:
|
duplicati:
|
||||||
image: duplicati-mysqlclient #https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/mysqlclient
|
image: duplicati-mysqlclient #https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/mysqlclient
|
||||||
@@ -42,13 +41,18 @@ services:
|
|||||||
- MYSQL_DATABASE=${DB_NAME}
|
- MYSQL_DATABASE=${DB_NAME}
|
||||||
- MYSQL_USER=${DB_USER}
|
- MYSQL_USER=${DB_USER}
|
||||||
- MYSQL_PASSWORD=${DB_PASSWORD}
|
- MYSQL_PASSWORD=${DB_PASSWORD}
|
||||||
- DESTINATION=/git/db-dumps
|
- MYSQL_BACKUP_FOLDER=/bck/db-dumps
|
||||||
|
- INFLUXDB_SERVER=${INFLUXDB_SERVER}
|
||||||
|
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
|
||||||
|
- INFLUXDB_ORG=${INFLUXDB_ORG}
|
||||||
|
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
|
||||||
|
- INFLUXDB_CLIENT_HOSTNAME=${INFLUXDB_CLIENT_HOSTNAME}
|
||||||
volumes:
|
volumes:
|
||||||
- duplicati-data:/data
|
- duplicati-data:/data
|
||||||
- duplicati-data:/git/duplicati-data:ro
|
- duplicati-data:/bck/duplicati-data:ro
|
||||||
- data:/git/data:ro
|
- data:/bck/data:ro
|
||||||
- db:/git/db:ro
|
- db:/bck/db:ro
|
||||||
- db-dumps:/git/db-dumps
|
- db-dumps:/bck/db-dumps
|
||||||
ports:
|
ports:
|
||||||
- ${DUPLICATI_PORT}:8200
|
- ${DUPLICATI_PORT}:8200
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|||||||
Reference in New Issue
Block a user