Implement ignore rules in restic
This commit is contained in:
parent
bfce95d50d
commit
834f40d3ad
@ -59,6 +59,14 @@ backup() {
|
||||
# we can script around it.
|
||||
/opt/restic-wrapper \
|
||||
--verbose \
|
||||
{% for item in backup_s3backup_exclude_list + backup_s3backup_exclude_list_extra %}
|
||||
--exclude="{{ item }}" \
|
||||
{% endfor %}
|
||||
--exclude="/data/**/backup" \
|
||||
--exclude="/data/**/backups" \
|
||||
--exclude="*.bak" \
|
||||
--exclude="*.tmp" \
|
||||
--exclude="*.swp" \
|
||||
backup \
|
||||
"$@"
|
||||
# In addition, we should also prune our backups
|
||||
@ -129,12 +137,7 @@ if [ -n "${DIRS[*]}" ]; then
|
||||
for dir in "${DIRS[@]}"; do
|
||||
echo "- $dir"
|
||||
done
|
||||
if command -v restic > /dev/null 2>&1; then
|
||||
echo "An ignore list was specified, but restic was detected as the backup method."
|
||||
echo "The following list of items WILL be backed up:"
|
||||
else
|
||||
echo "Will ignore the following items:"
|
||||
fi
|
||||
echo "Will ignore the following items:"
|
||||
{% for item in backup_s3backup_exclude_list + backup_s3backup_exclude_list_extra %}
|
||||
echo "- {{ item }}"
|
||||
{% endfor %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user