Upgrading SDNC with export/import of data
High level steps
run daexim to export mdsal
run sqldump to export mariadb data (just in case)
copy the files to backup directory
helm delete/undelply --purge of sdnc
cleanup k8 pvc, pv, secrets (modify cleanup.sh to not remove mariadb database
DON'T remove dockerdata-nfs data
helm deploy dev-sdnc .... for normal upgrade
copy daexim json file to dockerdata-nfs/dev-sdnc/sdnc/mdsal0 if you mistakenly removed the dockerdata-nfs
run daexim import of mdsal
if mariadb was cleaned run mysqldump to import the databsase backup
Export Script (exportMdsal.sh)
Replace ODL_IP with your k8 host IP of sdnc-0 or set ODL_IP in your environment
Import Script (importMdsal.sh)
Replace ODL_IP with your k8 host IP of sdnc-0 or set ODL_IP in your environment
Make sure the backup json files are in /dockerdata-nfs/dev-sdnc/sdnc/mdsal0
root@release-nfs:~/sdnc# ls -l /dockerdata-nfs/dev-sdnc/sdnc/mdsal0
total 388
drwxr-xr-x 2 systemd-network systemd-journal 4096 Oct 7 05:30 boot
-rw-r--r-- 1 systemd-network systemd-journal 240673 Oct 10 15:25 odl_backup_config.json
-rw-r--r-- 1 systemd-network systemd-journal 5649 Oct 10 15:25 odl_backup_models.json
-rw-r--r-- 1 systemd-network systemd-journal 141530 Oct 10 15:25 odl_backup_operational.json
If you get an error on netconf clustering not found make sure that the clustering:true setting is the same in both the export and the import ODL.
Mariadb Export/Dump
Log into the mariadb container via kubectl exec -it ...
mysqldump -u sdnctl -p sdnctl > sdnctl.dump
[kubectl cp sdnctl.dump out of the container]
Mariadb Import
Copy the dump into the mariadb container
Log into the mariadb container via kubectl exec -it
mysql -u sdnctl -p sdnctl < sdnctl.dump