Implement dynamic backups for ostree systems, backing up system configuration in its entirety
This commit is contained in:
parent
3acd6ea63d
commit
b7085c7e5b
@ -33,7 +33,18 @@ declare -a DIRS
|
|||||||
{% for item in backup_s3backup_list + backup_s3backup_list_extra %}
|
{% for item in backup_s3backup_list + backup_s3backup_list_extra %}
|
||||||
DIRS+=("{{ item }}")
|
DIRS+=("{{ item }}")
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
# End directories
|
# End directory manual configuration
|
||||||
|
|
||||||
|
# If we have ostree, add diff'd configs to the list, too
|
||||||
|
if command -v ostree > /dev/null 2>&1; then
|
||||||
|
for file in $(
|
||||||
|
ostree admin config-diff 2>/dev/null | \
|
||||||
|
grep -e '^[A|M]' | \
|
||||||
|
awk '{print $2}'
|
||||||
|
); do
|
||||||
|
DIRS+=("/etc/$file")
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Tar up all items in the backup list, recursively, and pipe them straight
|
# Tar up all items in the backup list, recursively, and pipe them straight
|
||||||
# up to S3
|
# up to S3
|
||||||
|
Loading…
Reference in New Issue
Block a user