Date: Thu, 28 Mar 2024 10:47:29 +0000 (UTC) Message-ID: <1443124089.102290.1711622849930@aws-us-west-2-onap-confluence-1.web.codeaurora.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_102289_1455015118.1711622849927" ------=_Part_102289_1455015118.1711622849927 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
In order to restore data using the graphSON snapshot, here are t= he steps to follow:
Check the snapshots folder in the graphadmin pod running in your namespa= ce:
kubectl exec -it = $(kubectl get pods -lapp=3Daai-graphadmin -n onap --template '{{range .ite= ms}}{{.metadata.name}}{{"\n"}}{{end}}' | head -1) -n onap -- ls -ltr /opt/a= pp/aai-graphadmin/logs/data/dataSnapshots/
You should see something like below
-rw-r--r-- 1 aaia= dmin aaiadmin 1353242 Nov 14 21:45 dataSnapshot.graphSON.201811142145
Choose the latest snapshot that you want to restore the database with an= d copy the snapshot outside of the graphadmin container for safe storage as= after you do dataRestore, you will need to kill all the pods as the dataRe= store drops the keyspace and creates the keyspace so resource, traversal an= d graphadmin cannot automatically recover
kubectl cp onap/$= (kubectl get pods -lapp=3Daai-graphadmin -n onap --template '{{range .item= s}}{{.metadata.name}}{{"\n"}}{{end}}' | head -1):/opt/app/aai-graphadmin/lo= gs/data/dataSnapshots/dataSnapshot.graphSON.201811142145 /tmp/dataSnapshot.= graphSON.201811142145
Run the following command to connect to the cassandra cluster and do a d= ataRestore from an earlier graphSON format
kubectl exec -it = $(kubectl get pods -lapp=3Daai-graphadmin -n onap --template '{{range .ite= ms}}{{.metadata.name}}{{"\n"}}{{end}}' | head -1) -n onap gosu aaiadmin /op= t/app/aai-graphadmin/scripts/dataRestoreFromSnapshot.sh dataSnapshot.graphS= ON.201811142145
You should see some logs being printed and at the end it will give you i= nfo on the number of vertices in the graph when successfully restored.
Afterwards, kill the resources, traversal and graphadmin pod using the f= ollowing command:
kubectl delete po= d $(kubectl get pods -lapp=3Daai-resources -n onap --template '{{range .it= ems}}{{.metadata.name}}{{"\n"}}{{end}}') -n onap kubectl delete pod $(kubectl get pods -lapp=3Daai-traversal -n onap --temp= late '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') -n onap kubectl delete pod $(kubectl get pods -lapp=3Daai-graphadmin -n onap --tem= plate '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') -n onap