diff --git a/documentation/restore.md b/documentation/restore.md new file mode 100644 index 0000000..db974c5 --- /dev/null +++ b/documentation/restore.md @@ -0,0 +1,47 @@ +# Restore + +[TOC] + +## Prerequisites +- [Setup](setup.md) +- Stop all containers except duplicati + +## Storage Restore + + Duplicati web UI - Import backup job + note: disable schedules + +### DB Engine is the same + +Restore everything from backup to original folders + +### DB Engine not the same + +Restore everything except db_data folders (db_dumps must be included) + +#### Restore Database +- Confirm if DB container is running (only db and duplicati should be running) +- Execute on duplication bash (using portainer) + +execute: +```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 + + + diff --git a/documentation/setup.md b/documentation/setup.md index ba7fe65..7f0d89d 100644 --- a/documentation/setup.md +++ b/documentation/setup.md @@ -15,6 +15,7 @@ lxc launch ubuntu $containername -p $lxc_profile # Setup container for docker lxc exec $containername -- bash -c "curl https://git.limbosolutions.com/kb/lxc/scripts/ubuntu-fuse-setup.sh | bash" ``` +Setup using portainer [docker compose](docker/docker-compose.yaml). ## Fresh Install @@ -57,4 +58,4 @@ Only required of database data files not recovarable (example: diferent database 1) Start Portainer container (stopped in restore process) 2) Start Database container (stopped in restore process) 3) Enter duplicati bash (by using portainer) -4) Execute Command \ No newline at end of file +4) Execute Command