diff options
author | Venkata Harish K Kajur <vk250x@att.com> | 2017-11-02 09:11:31 -0400 |
---|---|---|
committer | Venkata Harish K Kajur <vk250x@att.com> | 2017-11-02 09:34:48 -0400 |
commit | f7dc0ae9ea1818c4285f454a35a323310a72a6bc (patch) | |
tree | ed0c79e302a6b8e5e8b0d8572d02369756aba7e6 /aaicron.sh | |
parent | 955d6b0dfe6b463c301e30a4424c109fec7ecf31 (diff) |
Add the crontab for aai to save the datasnapshot
every hour so the clients won't accidentally lose data
Issue-ID: AAI-447
Change-Id: I527307e33dac3550e372d0117c5a4f6ecc320d37
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aaicron.sh')
-rw-r--r-- | aaicron.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/aaicron.sh b/aaicron.sh new file mode 100644 index 0000000..f977ebf --- /dev/null +++ b/aaicron.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +RESOURCES_COUNT=$(docker ps | grep 'testconfig_aai-resources.api.simpledemo.openecomp.org_1' | wc -l); + +if [ ${RESOURCES_COUNT} -eq 0 ]; then + docker exec -u aaiadmin testconfig_aai-resources.api.simpledemo.openecomp.org_1 /opt/app/aai-resources/bin/dataSnapshot.sh >> /var/log/aaicron.log 2>&1 +fi; |