Skip to content

Commit 636870d

Browse files
vaibhavhdqiluo-msft
authored andcommitted
Save DB dump after warm/fast reboot (#8803)
As a part of warmboot, redis database is dumped: https://github.com/Azure/sonic-utilities/blob/c97fe546e5a725b9049047293a4fede48fde5223/scripts/fast-reboot#L269 However, this dump file is deleted, after it is loaded back into db post reboot. The DB dump can be useful for debugging purpose, hence taking a backup of it can be useful. Instead of deleting the dump, rename and keep the dump.
1 parent 7187041 commit 636870d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

files/build_templates/docker_image_ctl.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ function postStartAction()
116116
sleep 1;
117117
done
118118
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then
119-
rm -f $WARM_DIR/dump.rdb
119+
# retain the dump file from last boot for debugging purposes
120+
mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old
120121
else
121122
# If there is a config_db.json dump file, load it.
122123
if [ -r /etc/sonic/config_db$DEV.json ]; then

0 commit comments

Comments
 (0)