From 06b52a9ef7d7fa34b6cf7251890e27eb58cf4990 Mon Sep 17 00:00:00 2001 From: Vaibhav Hemant Dixit Date: Wed, 6 Oct 2021 21:42:55 +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 1bf0552a29dd..a4a0d250610c 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -50,7 +50,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 dump file, load it if [ -r /etc/sonic/config_db.json ]; then