Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple, comma separated , tags #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions restic-runner
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Backup set config files should specify these variables:

# tag: Tag string for backup set.
# tag: Tag string for backup set. Comma separated list
# include_paths: An array of strings, each of which is a path to backup.
# exclude_patterns: An array of strings, each of which is an exclude glob pattern.
# keep_policy: An array of "--keep-period N" strings (unquoted in the array)
Expand Down Expand Up @@ -159,7 +159,7 @@ function tag {

if [[ $tag ]]
then
echo "--tag $tag"
echo "--tag $(echo $tag | sed -e 's/,/ --tag /g')"
fi
}

Expand All @@ -170,7 +170,7 @@ function snapshot-ids {
unset du

restic snapshots \
--tag "$tag" \
$(tag) \
| head -n -2 \
| tail -n +3 \
| awk '/^[^ ]/ { print $1 }'
Expand Down Expand Up @@ -276,7 +276,7 @@ function backup {
--exclude-caches \
$(exclude_if_present) \
--exclude-file "$exclude_file" \
--tag "$tag" \
$(tag) \
"${include_paths[@]}"
}
function check {
Expand Down