.
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
# git.limbosolutions.com
|
# git.limbosolutions.com
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
for more information check /documentation/setup.md
|
for more information check /documentation/setup.md
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Backup Strategy
|
## Backup Strategy
|
||||||
|
|
||||||
Duplicati running on docker.
|
Duplicati running on docker.
|
||||||
|
|||||||
@@ -26,59 +26,41 @@ Access duplicati (http://ipaddress:8200) and set a password
|
|||||||
|
|
||||||
### Process
|
### Process
|
||||||
|
|
||||||
1) Recreate stack gitea _[Docker Compose](../docker/docker-compose.yaml)_ removing read only restrictions on duplicati volumes
|
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
|
1) Check every Container is ok and running
|
||||||
1) Stop Every Container except duplicati (including portainer, if restoring portainer is a requirement)
|
1) Stop every Container except duplicati and portainer
|
||||||
_note: restore portainer not tested_
|
_note: restore of portainer/duplicati not tested_
|
||||||
1) Enter Duplicati (http://githost:8200)
|
1) Enter Duplicati (http://githost:8200)
|
||||||
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
|
||||||
- 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)
|
- Remove references to scripts (example:run-script-before-required, /data/myScripts/backupdb.sh)
|
||||||
- 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**
|
||||||
- Restore to duplicati only custom scripts (duplicati-data/myScripts), dot not restore full duplicati with this processs because duplicati is running!
|
- From duplicati only restore 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
|
1) Recreate stack gitea _[Docker Compose](../docker/docker-compose.yaml)_ with original read only restrictions on duplicati volumes
|
||||||
|
1) Confirm everything is ok and running
|
||||||
|
1) Return to duplicati on schedule job add script to run-script-before-required /data/myScripts/backupdb.sh
|
||||||
|
1) Execute a backup
|
||||||
|
1) Reenable Scheduling
|
||||||
|
|
||||||
### Database
|
### Database
|
||||||
|
|
||||||
Only required of database data files not recovarable (example: diferent database engine from backup)
|
Only required if database data files not recovarable. (Example: diferent database engine from backup)
|
||||||
|
|
||||||
1) Start Portainer container (if stopped in restore process)
|
1) Start Portainer container (if stopped in restore process)
|
||||||
2) Start Database container (if stopped in restore process)
|
2) Start Database container (if stopped in restore process)
|
||||||
3) Enter dabase container bash (by using portainer)
|
3) Enter Database container bash (by using portainer)
|
||||||
4) Execute Command
|
4) Execute:
|
||||||
|
|
||||||
````bash
|
|
||||||
|
|
||||||
```bash
|
|
||||||
#check last files db-dumps
|
|
||||||
ls /git/db-dumps
|
|
||||||
#pick file to import (maybe the last one :))
|
|
||||||
```
|
|
||||||
|
|
||||||
import file
|
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
#select a file to import
|
||||||
ls /db-dumps
|
ls /db-dumps
|
||||||
#select a file to import
|
#select a file to import
|
||||||
DB_FILE=filenametoimport
|
DB_FILE= "file name to import"
|
||||||
# by default duplicati container dont have de enviroment varible ${DB_ROOT_PASSWORD}
|
#
|
||||||
mysql -uroot -p'${MYSQL_ROOT_PASSWORD}' $MYSQL_DATABASE < /db-dumps/$DB_FILE
|
mysql --host db -uroot -p ${MYSQL_DATABASE} < /db-dumps/$DB_FILE
|
||||||
|
#enter root password (root password is in enviromnent variable ${MYSQL_ROOT_PASSWORD})
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
````
|
|
||||||
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
|
|
||||||
Reference in New Issue
Block a user