Path with spaces does not exist but expanded command is valid
jungaretti opened this issue · comments
I'm running into a situation where crestic home backup
fails but the expanded command from env CRESTIC_DRYRUN=1 crestic home backup
succeeds. I just upgraded to macOS Monterey, I wonder if a new feature/bug is causing this?
Output
crestic home backup
:
/Volumes/External\ HD/Data does not exist, skipping
repository 905309af opened successfully, password is correct
env CRESTIC_DRYRUN=1 crestic home backup
:
Warning: Executing in debug mode. restic will not run, backups are not touched!
Config files: /Users/username/.config/crestic/crestic.cfg, /etc/crestic/crestic.cfg
Config files used: /Users/username/.config/crestic/crestic.cfg
Config sections: global, global.backup, laptop, laptop.backup, laptop, laptop.backup
Config sections used: global.backup, laptop, laptop.backup, laptop, laptop.backup
Env sections: global.environ, global.backup.environ, laptop.environ, laptop.backup.environ, laptop.environ, laptop.backup.environ
Env sections used:
Expanded command: restic backup --exclude-file /Users/username/.config/restic/exclude.txt --repo b2:bucket:repo.restic --host laptop /Users/username /Volumes/External\ HD/Data
Expanded command (restic backup --exclude-file /Users/username/.config/restic/exclude.txt --repo b2:bucket:repo.restic --host laptop /Users/username /Volumes/External\ HD/Data
):
repository 142445hd opened successfully, password is correct
The expanded command works perfectly, but it seems like crestic has trouble parsing the path with a space? Here's my config file:
[global.backup]
exclude-file: ~/.config/restic/exclude.txt
[laptop]
repo: b2:bucket:repo.restic
[laptop.backup]
host: laptop
arguments:
/Users/username
/Volumes/External\ HD/Data
I'm using crestic 0.6.0
(installed from pip) and restic 0.12.1 compiled with go1.17.2 on darwin/amd64
.
Hmm, peculiar. I don't think you you need to escape spaces, so can you try just using
arguments:
/Users/username
/Volumes/External HD/Data
?
Good catch, that fixed it! Thanks for your great work on crestic.