IS_EVOBACKUP_EXCLUDE_MOUNT fail to work on old evobackup versions #150
Labels
No labels
bug
bullseye
discussion
duplicate
enhancement
help wanted
invalid
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/evocheck#150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
if grep -q "^VERSION=" "${evobackup_file}"; then
evobackup_version=$(sed -E -n 's/VERSION="(.*)"/\1/p' "${evobackup_file}")
# versions over 22.12 use a new syntax to exclude rsync files
if dpkg --compare-versions "$evobackup_version" ge 22.12 ; then
sed -En '/RSYNC_EXCLUDES="/,/"/ {s/(RSYNC_EXCLUDES=|")//g;p}' > "${excludes_file}"
else
grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' > "${excludes_file}"
fi
fi
results in old evobackup to be considered to not have any excludes.
This might work better for old versions of evobackup (those without
VERSION=
) :Or repeat the later case (the one for the old
evobackup
s).