Quote paths properly
alqu opened this issue · comments
alqu commented
When using paths for exclusion then the path itself is not properly escaped in the resulting restic call.
E.g.
locations:
hdd:
from:
- /Users
to:
- myBackupTarget
options:
backup:
exclude:
- ~/Library/Group Containers
- .DS_Store
- ~/Library/Caches
# - ...
Gets expanded to the following command:
> Executing: /opt/homebrew/bin/restic backup --exclude ~/Library/Group Containers --exclude .DS_Store --exclude ~/Library/Caches --tag ar:location:hdd /Users
using parent snapshot 123456
Expected behavior
Paths that contain blanks should be escaped properly like:
> Executing: /opt/homebrew/bin/restic backup --exclude ~/Library/Group\ Containers --exclude .DS_Store --exclude ~/Library/Caches --tag ar:location:hdd /Users
using parent snapshot 123456
Environment
- OS: MacOS
- Version: 13.2.1
Additional context
Installed autorestic via homebrew and created a config file in ~/.autorestic.yml