Save DB dump after warm/fast reboot (#8913)

Back porting the master branch change - #8803

Save the redis DB dump after warm reboot.
This commit is contained in:
Vaibhav Hemant Dixit 2021-10-22 10:51:43 -07:00 committed by GitHub
parent 52366b099d
commit f1d817ae54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,8 @@ function postStartAction()
sleep 1; sleep 1;
done done
if [[ ("$BOOT_TYPE" == "warm" || "$BOOT_TYPE" == "fastfast") && -f $WARM_DIR/dump.rdb ]]; then 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 else
# If there is a config db dump file, load it # If there is a config db dump file, load it
if [ -r /etc/sonic/config_db.json ]; then if [ -r /etc/sonic/config_db.json ]; then