004a0c982867e0846dd180b05bd824b3cbe4d937
[aai/aai-common.git] / docs / platform / Getting Started / How_to_AAI_data_snapshot_and_restore_in_ONAP_1_1.rst
1 .. contents::
2    :depth: 3
3 ..
4
5 How to A&AI data snapshot and restore in ONAP 1.1
6 =================================================
7
8 1. Check the containers that are running and get the container name for
9    resources micro service as this container contains both dataSnapshot
10    and restore scripts
11
12 2. If the deployment was followed properly, then the container name
13    would have been
14    testconfig\_aai-resources.api.simpledemo.openecomp.org\_1
15
16 3. Run the following command to save the current snapshot of your data:
17
18     docker exec -u aaiadmin -it
19     testconfig\_aai-resources.api.simpledemo.openecomp.org\_1
20     /opt/app/aai-resources/bin/dataSnapshot.sh
21
22 1. After running that command, you should see the following line in the
23    standard output:
24
25     Snapshot written to
26     /opt/app/aai-resources/logs/data/dataSnapshots/dataSnapshot.graphSON.201709221713
27
28 1. This file dataSnapshot.graphSON.201709221713 can be found in
29    /opt/aai/logroot/AAI-RESOURCES/data/dataSnapshots on the host vm
30
31 2. If you want to restore the data from the snapshot, then you would run
32    this command:
33
34     docker exec -u aaiadmin -it
35     testconfig\_aai-resources.api.simpledemo.openecomp.org\_1
36     /opt/app/aai-resources/bin/dataRestoreFromSnapshot.sh
37     dataSnapshot.graphSON.201709221713
38
39 1. The argument to the dataRestoreFromSnapshot.sh is the dataSnapshot
40    graphson file and it only needs the base name and expects to be found
41    in the host vm /opt/aai/logroot/AAI-RESOURCES/data/dataSnapshots.
42
43 2. Once that command is run, you will be given a warning of 5 seconds to
44    quit the process as it will replace whatever you have in your A&AI
45    data with that snapshot and any current data thats not saved into a
46    snapshot will be lost.