Add a backup disk usage analyzer script
This commit is contained in:
parent
76342928b3
commit
1dbf436a50
@ -3,6 +3,8 @@
|
|||||||
---
|
---
|
||||||
- name: template out backup script
|
- name: template out backup script
|
||||||
ansible.builtin.template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
ansible.builtin.template: src={{ backup_script }}.sh dest=/opt/backup.sh mode=0700 owner=root group=root
|
||||||
|
- name: template out analyze script
|
||||||
|
ansible.builtin.template: src={{ backup_script }}-analyze.sh dest=/opt/analyze.sh mode=0700 owner=root group=root
|
||||||
- name: template out restore script
|
- name: template out restore script
|
||||||
ansible.builtin.template: src={{ restore_script }}.sh dest=/opt/restore.sh mode=0700 owner=root group=root
|
ansible.builtin.template: src={{ restore_script }}.sh dest=/opt/restore.sh mode=0700 owner=root group=root
|
||||||
- name: configure systemd service
|
- name: configure systemd service
|
||||||
|
17
roles/backup/templates/s3backup-analyze.sh
Normal file
17
roles/backup/templates/s3backup-analyze.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# s3backup-analyze.sh
|
||||||
|
# A companion script to s3backup to analyze disk usage for backups
|
||||||
|
|
||||||
|
# NOTICE: DO NOT MODIFY THIS FILE
|
||||||
|
# Any changes made will be clobbered by Ansible
|
||||||
|
# Please make any configuration changes in the main repo
|
||||||
|
|
||||||
|
exec ncdu \
|
||||||
|
{% for item in backup_s3backup_list + backup_s3backup_list_extra %}
|
||||||
|
"{{ item }}" \
|
||||||
|
{% endfor %}
|
||||||
|
{% for item in backup_s3backup_exclude_list + backup_s3backup_exclude_list_extra %}
|
||||||
|
--exclude "{{ item }}" \
|
||||||
|
{% endfor %}
|
||||||
|
-r
|
Loading…
Reference in New Issue
Block a user