Files
git.limbosolutions.com/documentation/setup.md
2022-10-08 12:49:12 +01:00

70 lines
1.8 KiB
Markdown

# Setup
## Install
### Requirements
- Docker
_Currently hosted on an ubuntu lxc container with docker and portainer [+ information](setup-lxc.md)._
### Services (Stacks)
If portainer installed use portainer (default https//host:9000) to setup/manage services
#### Gitea
- Stack Name: gitea
_[Docker Compose](../docker/docker-compose.yaml)_
## Restore
### Requirements
- Host setup with docker and portainer ./setup.md
1) Check Every Container is ok and running
2) Stop Every Container except duplicati (including portainer, if restoring portainer is a requirement)
_note: restore portainer not tested_
3) Enter Duplicati
4) Import Backup job (if not possible next steps must be adapted)
- All Imported jobs schedules must be disabled (or disable write permissions on backup host)
5) Restore all files to original location
- If database engine is diferent do not restore db_data and check restore database **before next steps**
6) Start Containers and check if everything is ok
### Database
Only required of database data files not recovarable (example: diferent database engine from backup)
1) Start Portainer container (if stopped in restore process)
2) Start Database container (if stopped in restore process)
3) Enter duplicati bash (by using portainer)
4) Execute Command
````bash
```bash
#check last files db-dumps
ls /git/db-dumps
#pick file to import (maybe the last one :))
```
import file
```bash
DB_FILE=filenametoimport
# by default duplicati container dont have de enviroment varible ${DB_ROOT_PASSWORD}
DB_ROOT_PASSWORD=youdbrootpassword
mysql -uroot -p'${DB_ROOT_PASSWORD}' ${DB_NAME} < /git/db-dumps/$DB_FILE
```
````
3) start all stop containers and check everyting is ok
4) Execute backup on duplicati
5) Check backup is restorable
6) Re Enable schedule backups on duplication