@@ -126,6 +126,8 @@ migrate_nos_configuration()
126126 PORT_CONFIG_GZFILE=$NOS_DIR /port_config.json.gz.base64.txt
127127 PORT_CONFIG_FILE=$NOS_DIR /port_config.json
128128 SNMP_FILE=$NOS_DIR /snmp.yml
129+ GOLDEN_CONFIG_DB_GZFILE=$NOS_DIR /golden_config_db.json.gz.base64.txt
130+ GOLDEN_CONFIG_DB_FILE=$NOS_DIR /golden_config_db.json
129131 mkdir -p $NOS_DIR
130132
131133 mount $nos_dev $NOS_DIR
@@ -137,13 +139,15 @@ migrate_nos_configuration()
137139 [ -f $MG_GZFILE ] && /usr/bin/base64 -d $MG_GZFILE | /bin/gunzip > $MG_FILE
138140 [ -f $ACL_GZFILE ] && /usr/bin/base64 -d $ACL_GZFILE | /bin/gunzip > $ACL_FILE
139141 [ -f $PORT_CONFIG_GZFILE ] && /usr/bin/base64 -d $PORT_CONFIG_GZFILE | /bin/gunzip > $PORT_CONFIG_FILE
142+ [ -f $GOLDEN_CONFIG_DB_GZFILE ] && /usr/bin/base64 -d $GOLDEN_CONFIG_DB_GZFILE | /bin/gunzip > $GOLDEN_CONFIG_DB_FILE
140143
141144 # Copy relevant files
142145 nos_migration_import $NOS_DIR /mgmt_interface.cfg /host/migration
143146 nos_migration_import $MG_FILE /host/migration
144147 nos_migration_import $ACL_FILE /host/migration
145148 nos_migration_import $PORT_CONFIG_FILE /host/migration
146149 nos_migration_import $SNMP_FILE /host/migration
150+ nos_migration_import $GOLDEN_CONFIG_DB_FILE /host/migration
147151
148152 if [ " $sonic_fast_reboot " == true ]; then
149153 mkdir -p /host/fast-reboot
@@ -261,13 +265,15 @@ if [ -f $FIRST_BOOT_FILE ]; then
261265 [ -f /host/acl.json ] && mv /host/acl.json /etc/sonic/old_config/
262266 [ -f /host/port_config.json ] && mv /host/port_config.json /etc/sonic/old_config/
263267 [ -f /host/snmp.yml ] && mv /host/snmp.yml /etc/sonic/old_config/
268+ [ -f /host/golden_config_db.json ] && mv /host/golden_config_db.json /etc/sonic/old_config/
264269 touch /tmp/pending_config_migration
265270 elif [ -n " $migration " ] && [ -f /host/migration/minigraph.xml ]; then
266271 mkdir -p /etc/sonic/old_config
267272 mv /host/migration/minigraph.xml /etc/sonic/old_config/
268273 [ -f /host/migration/acl.json ] && mv /host/migration/acl.json /etc/sonic/old_config/
269274 [ -f /host/migration/port_config.json ] && mv /host/migration/port_config.json /etc/sonic/old_config/
270275 [ -f /host/migration/snmp.yml ] && mv /host/migration/snmp.yml /etc/sonic/old_config/
276+ [ -f /host/migration/golden_config_db.json ] && mv /host/migration/golden_config_db.json /etc/sonic/old_config/
271277 touch /tmp/pending_config_migration
272278 [ -f /etc/sonic/updategraph.conf ] && sed -i -e " s/enabled=false/enabled=true/g" /etc/sonic/updategraph.conf
273279 else
0 commit comments