This commit is contained in:
2022-10-09 13:37:00 +01:00
parent 74b13252fe
commit fec022f1be
3 changed files with 71 additions and 23 deletions

View File

@@ -0,0 +1,30 @@
version: "3"
services:
duplicati:
image: duplicati-sqlclient # requirement https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/sqlclient.dockerfile
environment:
- DB_HOST=db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_TARGETFOLDER=/git/db-dumps
volumes:
- duplicati-data:/data
- duplicati-data:/git/duplicati-data:ro
- data:/git/data:ro
- db:/git/db:ro
- db-dumps:/git/db-dumps
ports:
- 8200:8200
restart: unless-stopped
volumes:
duplicati-data:
data:
name: ${GITEA_APP_VOLUMES_DATA_NAME}
db:
name: ${GITEA_DB_VOLUMES_DATA_NAME}
db-dumps:
name: ${GITEA_DB_VOLUMES_DB-DUMPS_NAME}
networks:
gitea:
name: ${GITEA_NETWORK_NAME}

View File

@@ -16,6 +16,8 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
ports: ports:
- ${HTTP_PORT}:80 - ${HTTP_PORT}:80
networks:
- gitea
db: db:
image: mysql:8 image: mysql:8
restart: always restart: always
@@ -29,25 +31,15 @@ services:
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
- db-dumps:/db-dumps - db-dumps:/db-dumps
duplicati: networks:
image: duplicati-sqlclient # requirement https://git.limbosolutions.com/kb/duplicati/src/branch/main/docker/sqlclient.dockerfile - gitea
environment:
- DB_HOST=db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_TARGETFOLDER=/git/db-dumps
volumes:
- duplicati-data:/data
- duplicati-data:/git/duplicati-data:ro
- data:/git/data:ro
- db:/git/db:ro
- db-dumps:/git/db-dumps
ports:
- 8200:8200
restart: unless-stopped
volumes: volumes:
data: data:
name: ${GITEA_APP_VOLUMES_DATA_NAME}
db: db:
name: ${GITEA_DB_VOLUMES_DATA_NAME}
db-dumps: db-dumps:
duplicati-data: name: ${GITEA_DB_VOLUMES_DB-DUMPS_NAME}
networks:
gitea:
name: ${GITEA_NETWORK_DEFAULT_NAME}

View File

@@ -11,12 +11,38 @@ _Currently hosted on an ubuntu lxc container with docker and portainer [+ inform
### Services (Stacks) ### Services (Stacks)
If portainer installed use portainer (http://githost:9000) to setup/manage services If portainer installed use portainer (http://githost:9000) to setup/manage services
Stacks:
- Stack Name: gitea Required environment variables (.env):
_[Docker Compose](../docker/docker-compose.yaml)_
Access duplicati (http://ipaddress:8200) and set a password ```bash
GITEA_APP_VOLUMES_DATA_NAME=gitea_app_data
GITEA_DB_VOLUMES_DATA_NAME=gitea_db_data
GITEA_DB_VOLUMES_DB-DUMPS_NAME=gitea_db-dumps
GITEA_NETWORK_DEFAULT_NAME=gitea_default
DB_NAME=??
DB_USER=??
DB_PASSWORD=??
DB_ROOT_PASSWORD=??
HTTP_PORT=???
```
#### Gitea
_[Docker Compose File](../docker/gitea-docker-compose.yaml)_
#### Duplicati
_[Docker Compose File](../docker/dupliticati-docker-compose.yaml)_
After starting stack:
- Access duplicati (http://ipaddress:8200) and set a password
##### Requirements
- Duplicati Container with mySql client
- [Dockerfile](htpp://missinggiturl)
- [Git](https://git.limbosolutions.com/kb/duplicati)
## Restore ## Restore
@@ -34,7 +60,7 @@ Access duplicati (http://ipaddress:8200) and set a password
1) Import Backup job (if not possible next steps must be adapted) 1) Import Backup job (if not possible next steps must be adapted)
- Restore with permissions checked - Restore with permissions checked
- All Imported jobs schedules must be disabled (or disable write permissions on backup host) - All Imported jobs schedules must be disabled (or disable write permissions on backup host)
- Remove references to scripts (example:run-script-before-required, /data/myScripts/backupdb.sh) - (step not required after this migration) Remove references to scripts (example:run-script-before-required, /data/myScripts/backupdb.sh)
1) Recreate duplicati local database (home-> backup-> advanced-> database-> Recreate (delete and repair)) 1) Recreate duplicati local database (home-> backup-> advanced-> database-> Recreate (delete and repair))
1) Restore all files to original location 1) Restore all files to original location
- If database engine is diferent do not restore db_data and check restore database **before next steps** - If database engine is diferent do not restore db_data and check restore database **before next steps**