From 97aa13a07de07dac4238aadaf3721fea24e7e8c6 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 12 Feb 2022 12:20:46 +0000 Subject: [PATCH] Updated recovery --- README.md | 10 +++++++++- docker-volume-recover.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1c67480..88be8aa 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,13 @@ Execute: ./docker-volume-backup.sh ``` -## Recover one volume +## Recover + +```bash + docker exec -i mysql_container mysql -uroot -psecret database < db.sql +``` + +### Volume Execute: ```bash @@ -25,6 +31,8 @@ bash ./docker-volume-recover.sh "{{volume_name}}" "$(sha256sum /etc/machine-id | ``` +### Database + ## Debug To checkout what's going on in the mount container type in the following command: diff --git a/docker-volume-recover.sh b/docker-volume-recover.sh index 1466421..befbf5b 100644 --- a/docker-volume-recover.sh +++ b/docker-volume-recover.sh @@ -3,7 +3,7 @@ # @param $2 Hash-Name volume_name="$1" backup_hash="$2" -backup_path="/Backups/$backup_hash/docker-volume-backup/latest/$volume_name/raw" +backup_path="/Backups/$backup_hash/docker-volume-backup/latest/$volume_name/files" echo "Inspect volume $volume_name" docker volume inspect "$volume_name" exit_status_volume_inspect=$?