From baa54e92f7a22fea951d1f70bcc9d65324414595 Mon Sep 17 00:00:00 2001 From: Vaibhav Hemant Dixit Date: Mon, 20 Sep 2021 18:18:46 +0000 Subject: [PATCH] Save DB dump after warm/fast reboot --- files/build_templates/docker_image_ctl.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index 541f52656b07..99192b4458bd 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -153,7 +153,8 @@ function postStartAction() sleep 1; done if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then - rm -f $WARM_DIR/dump.rdb + # retain the dump file from last boot for debugging purposes + mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old else # If there is a config_db.json dump file, load it. if [ -r /etc/sonic/config_db$DEV.json ]; then