mongo backup
parent
e282152266
commit
36b2bb5d32
|
@ -0,0 +1,13 @@
|
||||||
|
- name: Backup MongoDB Databases
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Backup MongoDB databases
|
||||||
|
command: >
|
||||||
|
docker exec {{ mongodb_container }} mongodump
|
||||||
|
--db {{ item }}
|
||||||
|
--username {{ mongodb_user }}
|
||||||
|
--password {{ mongodb_password }}
|
||||||
|
--authenticationDatabase admin
|
||||||
|
--out {{ backup_dir }}
|
||||||
|
with_items: "{{ db_names }}"
|
Loading…
Reference in New Issue