Change backup to use all created files not only databases.
This commit is contained in:
16
odroid.yaml
16
odroid.yaml
@@ -102,12 +102,18 @@
|
||||
loop: "{{ databases }}"
|
||||
when: (ansible_date_time.weekday_number == "7")
|
||||
|
||||
- name: Store the daily backups
|
||||
copy:
|
||||
remote_src: true
|
||||
src: "{{ backup_dir }}/{{ item }}/"
|
||||
dest: "{{ backup_dir }}/{{ item }}/daily/"
|
||||
- name: Search for the created backups
|
||||
find:
|
||||
paths: "{{ backup_dir }}{{ item }}"
|
||||
file_tpye: file
|
||||
patterns: '*.gz'
|
||||
recurse: false
|
||||
register: backups
|
||||
loop: "{{ systems }}"
|
||||
|
||||
- name: Store the daily backup
|
||||
debug: var=item
|
||||
with_items: "{{ oldBackups.results | map(attribute='files') | list }}"
|
||||
when: (ansible_date_time.weekday_number != "7" and ansible_date_time.day != "01")
|
||||
|
||||
- name: Cleanup original backup files
|
||||
|
||||
Reference in New Issue
Block a user