Save DB dump after warm/fast reboot (#8803)
As a part of warmboot, redis database is dumped:
c97fe546e5/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.
This commit is contained in:
parent
62a1f5eb19
commit
ee9250e8cc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user