-
Notifications
You must be signed in to change notification settings - Fork 71
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
Format for exclude-file AND files-from #164
Comments
As workaround I managed to do it like this:
PRE_COMMANDS: |-
mkdir -p /mnt/restic_config
# Exclude file
echo "# Generals" >> /mnt/restic_config/exclude_file.txt
echo ".config/" >> /mnt/restic_config/exclude_file.txt
echo ".git/" >> /mnt/restic_config/exclude_file.txt
echo "..." >> /mnt/restic_config/exclude_file.txt
RESTIC_BACKUP_SOURCES: >-
# Category 1
/mnt/path11
/mnt/path12
# Category 2
/mnt/path21
/mnt/path22
# Category 3
/mnt/path31
#... I am not sure if anyone have better ideas for the above ? |
Sorry for the late answer. For Q1, you could just create your exclude file locally and then mount it into the container, like this: services:
backup:
environment:
RESTIC_BACKUP_ARGS: --verbose --exclude-file /mnt/restic_config/exclude_file.txt --tag resticker-auto
configs:
source: exclude_file.txt
target: /mnt/restic_config/exclude_file.txt
# ...
configs:
exclude_file.txt:
file: exclude_file.txt |
For a host-specific config, you could one service for each host (so set a different constraint on Or you could just use a bind mount (using |
Hi all,
I was trying to take advantage of the
PRE_COMMANDS
var to provide a list of files to skip but the syntax doesnt seem to bbe working... I have tried many ways and still failed...Of course using something like
exclude_file_ok.txt
(see below) works but is very unredable... Please advise what am I missing ?Next, I would like also to provide a list of files/folders from a file to be loaded using restic's
--files-from
, but I don't see such option forresticker
, or have I missed it ?The idea here is to create a different list to backup for each host of the swarm
if [[ "{{.Node.Hostname}}" == "host1" ]]; then echo "## list to include 1" > /mnt/restic_config/include_file.txt; elif ... fi
In any case, such file will be crated the same way as for the exclusion list, so It would also benefit the solution for the above issue...
Thank you
The text was updated successfully, but these errors were encountered: