.
This commit is contained in:
@@ -6,33 +6,39 @@
|
||||
|
||||
- Docker
|
||||
_Currently hosted on an ubuntu lxc container with docker and portainer [+ information](setup-lxc.md)._
|
||||
- On instructions replace githost with host ip or address
|
||||
|
||||
### Services (Stacks)
|
||||
|
||||
If portainer installed use portainer (default https//host:9000) to setup/manage services
|
||||
|
||||
#### Gitea
|
||||
If portainer installed use portainer (http://githost:9000) to setup/manage services
|
||||
Stacks:
|
||||
|
||||
- Stack Name: gitea
|
||||
_[Docker Compose](../docker/docker-compose.yaml)_
|
||||
|
||||
Access duplicati (http://ipaddress:8200) and set a password
|
||||
|
||||
## Restore
|
||||
|
||||
### Requirements
|
||||
|
||||
- Host setup with docker and portainer ./setup.md
|
||||
- Host setup with docker and portainer [+ information](setup.md)
|
||||
|
||||
### Process
|
||||
|
||||
1) Recreate stack gitea _[Docker Compose](../docker/docker-compose.yaml)_ removing read only restrictions on duplicati volumes
|
||||
1) Check Every Container is ok and running
|
||||
2) Stop Every Container except duplicati (including portainer, if restoring portainer is a requirement)
|
||||
1) 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)
|
||||
1) Enter Duplicati (http://githost:8200)
|
||||
1) 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
|
||||
- Remove references to scripts (example:run-script-before-required)
|
||||
- Recreate duplicati local database (home-> backup-> advanced-> database-> Recreate (delete and repair))
|
||||
1) 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
|
||||
- Restore to duplicati only custom scripts (duplicati-data/myScripts), dot not restore full duplicati with this processs because duplicati is running!
|
||||
1) Recreate stack gitea _[Docker Compose](../docker/docker-compose.yaml)_ with original read only restrictions on duplicati volumes
|
||||
|
||||
### Database
|
||||
|
||||
@@ -40,7 +46,7 @@ Only required of database data files not recovarable (example: diferent database
|
||||
|
||||
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)
|
||||
3) Enter dabase container bash (by using portainer)
|
||||
4) Execute Command
|
||||
|
||||
````bash
|
||||
@@ -53,11 +59,19 @@ ls /git/db-dumps
|
||||
|
||||
import file
|
||||
|
||||
|
||||
```bash
|
||||
ls /db-dumps
|
||||
#select a file to import
|
||||
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
|
||||
mysql -uroot -p'${MYSQL_ROOT_PASSWORD}' $MYSQL_DATABASE < /db-dumps/$DB_FILE
|
||||
|
||||
mysql -uroot -p $MYSQL_DATABASE < /db-dumps/$DB_FILE
|
||||
and enter rootpassword
|
||||
|
||||
|
||||
mysql --host db -uroot -p'${MYSQL_ROOT_PASSWORD}' < /git/db-dumps/$DB_FILE
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user