From 106482ad849e6167ef8057d581c493af20839a60 Mon Sep 17 00:00:00 2001 From: Matthew Lopez <73856503+MatthewL246@users.noreply.github.com> Date: Sun, 19 May 2024 21:13:04 -0400 Subject: [PATCH] Stop mitmproxy as well while restoring --- scripts/restore.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/restore.sh b/scripts/restore.sh index 7214d05..6a5dde1 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -61,9 +61,10 @@ print_info "Restoring Redis..." # Redis cannot be running when restoring a dump or it will overwrite the restored dump when it exits run_verbose_no_errors docker compose stop redis run_verbose_no_errors docker compose cp "$backup_dir/redis.rdb" redis:/data/dump.rdb -run_verbose_no_errors docker compose start redis print_info "Restoring Mitmproxy..." +# Mitmproxy cannot be running when restoring a backup or it will continue using its new certificate +run_verbose_no_errors docker compose stop mitmproxy-pretendo run_verbose_no_errors docker compose cp "$backup_dir/mitmproxy" mitmproxy-pretendo:/home/mitmproxy/.mitmproxy # The restored backup might be using different secrets than what are currently in the .env files