summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-06-01 12:02:48 +0000
committerGerrit Code Review <gerrit@onap.org>2018-06-01 12:02:48 +0000
commit356dcb5513777515e50d325c571e80b4bcf59b98 (patch)
tree8244492d3018e688aee0232c6363b33c207dc51d
parent92b4e3b50099aa6b7143d0b13bccf6a9a7944015 (diff)
parentb91390ec0ace31ec02df5bb9aeb7b9e94fab507f (diff)
Merge "Add backup/restore scripts"
Former-commit-id: 4e49497e804a678afc8f9a2a153e1d3f6000989b
-rw-r--r--installation/sdnc/src/main/scripts/backupMdsal.sh12
-rw-r--r--installation/sdnc/src/main/scripts/restoreMdsal.sh11
2 files changed, 23 insertions, 0 deletions
diff --git a/installation/sdnc/src/main/scripts/backupMdsal.sh b/installation/sdnc/src/main/scripts/backupMdsal.sh
new file mode 100644
index 00000000..3aefec28
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/backupMdsal.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+cat > /tmp/daexim-export.json <<-END
+{
+ "input": {
+ "data-export-import:run-at": 5
+ }
+}
+END
+
+curl -v -H "Content-Type: application/json" -X POST -uadmin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -d@/tmp/daexim-export.json http://localhost:8282/restconf/operations/data-export-import:schedule-export
+
diff --git a/installation/sdnc/src/main/scripts/restoreMdsal.sh b/installation/sdnc/src/main/scripts/restoreMdsal.sh
new file mode 100644
index 00000000..1f73d776
--- /dev/null
+++ b/installation/sdnc/src/main/scripts/restoreMdsal.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+cat > /tmp/daexim-import.json <<-END
+{
+ "input" : {
+ "check-models" : true,
+ "clear-stores" : "all"
+ }
+}
+END
+
+curl -v -H "Content-Type: application/json" -X POST -uadmin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -d@/tmp/daexim-import.json http://localhost:8080/restconf/operations/data-export-import:immediate-import