Skip to content

Commit

Permalink
Save DB dump after warm/fast reboot (#8803)
Browse files Browse the repository at this point in the history
As a part of warmboot, redis database is dumped:
https:/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.
  • Loading branch information
vaibhavhd authored and judyjoseph committed Sep 27, 2021
1 parent 17ccd8b commit 65c9092
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,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
Expand Down

0 comments on commit 65c9092

Please sign in to comment.