parent
c38264c49d
commit
370451fbe7
15 changed files with 192 additions and 42 deletions
@ -1,3 +1,10 @@ |
|||||||
#!/bin/bash -e |
#!/bin/bash -e |
||||||
|
|
||||||
mongodump --uri {{ appsmith_mongo_url }} --out {{ appsmith_root_dir }}/backup |
mongodump \ |
||||||
|
{% if appsmith_mongo_pass is defined and appsmith_mongo_pass != False %} |
||||||
|
{% set appsmith_mongo_url_obj = appsmith_mongo_url | urlsplit %} |
||||||
|
--uri {{ appsmith_mongo_url_obj['scheme'] }}://{{ appsmith_mongo_user }}:{{ appsmith_mongo_pass | urlencode | regex_replace('/','%2F') }}@{{ appsmith_mongo_url_obj['hostname'] }}{% if appsmith_mongo_url_obj['port'] %}:{{ appsmith_mongo_url_obj['port'] }}{% endif %}{{ appsmith_mongo_url_obj['path'] }}?{{ appsmith_mongo_url_obj['query'] }} \ |
||||||
|
{% else %} |
||||||
|
--uri {{ appsmith_mongo_url }} \ |
||||||
|
{% endif %} |
||||||
|
--out {{ appsmith_root_dir }}/backup |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
#!/bin/bash -e |
#!/bin/bash -e |
||||||
|
|
||||||
rm -rf {{ graylog_root_dir }}/dumps/{mongo,es}/* |
rm -rf {{ graylog_root_dir }}/backup/{mongo,es}/* |
||||||
|
@ -1,3 +1,10 @@ |
|||||||
#!/bin/bash -e |
#!/bin/bash -e |
||||||
|
|
||||||
mongodump --quiet --out {{ graylog_root_dir }}/dumps/mongo --uri {{ graylog_mongodb_uri[0] }} |
mongodump \ |
||||||
|
{% if graylog_mongo_url | length == 1 and graylog_mongo_pass is defined and graylog_mongo_pass != False %} |
||||||
|
{% set graylog_mongo = graylog_mongo_url[0] | urlsplit %} |
||||||
|
--uri {{ graylog_mongo['scheme'] }}://{{ graylog_mongo_user }}:{{ graylog_mongo_pass | urlencode | regex_replace('/','%2F') }}@{{ graylog_mongo['hostname'] }}{% if graylog_mongo['port'] %}:{{ graylog_mongo['port'] }}{% endif %}{{ graylog_mongo['path'] }}?{{ graylog_mongo['query'] }} \ |
||||||
|
{% else %} |
||||||
|
--uri {{ graylog_mongo_url[0] }} \ |
||||||
|
{% endif %} |
||||||
|
--quiet --out {{ graylog_root_dir }}/backup/mongo |
||||||
|
Loading…
Reference in new issue