Skip to content

Commit ee9250e

Browse files
authored
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 62a1f5e commit ee9250e

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
@@ -153,7 +153,8 @@ function postStartAction()
153153
sleep 1;
154154
done
155155
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then
156-
rm -f $WARM_DIR/dump.rdb
156+
# retain the dump file from last boot for debugging purposes
157+
mv $WARM_DIR/dump.rdb $WARM_DIR/dump.rdb.old
157158
else
158159
# If there is a config_db.json dump file, load it.
159160
if [ -r /etc/sonic/config_db$DEV.json ]; then

0 commit comments

Comments
 (0)