Tilde (~) does not work in macOS #30
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#30
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
OS: macOS 10.12.5
Borg version: 1.0.10
borgmatic version: 1.0.3
You will be told that the repository cannot be found: ~/My Directory/repo
Whereas this will work fine: /Users/myusername/My Directory/repo
Imported from Taiga issue 29 (done). Created on 2017-07-03T12:47:52+0000 by Sam A. Horvath-Hunt.
Confirmed that this repros on Linux as well. Converting to an enhancement, as this is just not something that Borg does. Should be pretty easy for borgmatic to provide that feature though.
Comment on 2017-07-26T04:35:56+0000 by Dan Helfman.
This has been implemented in borgmatic 1.1.9, just released!
Comment on 2017-10-30T03:37:11+0000 by Dan Helfman.
Hey. I just upgraded to 1.1.9 and this still isn't working as expected.
Config file is identical to this bar the obfuscation: https://github.com/SamHH/dotfiles/blob/master/etc/borgmatic/config.yaml
Results in error:
Repository /Users/<username>/~/example does not exist.
Comment on 2017-10-30T10:52:30+0000 by Sam A. Horvath-Hunt.
Yikes, okay. I'll take a look when I get a chance.
Comment on 2017-10-30T17:31:07+0000 by Dan Helfman.
Ah, looks like I (intentionally) only implemented tilde expansion for the
source_directories
option, but not forrepositories
. I don't recall exactly why I didn't do it forrepositories
.. It might have been because a repository can sometimes be local and can sometimes be remote, and it's not trivial to expand a remote tilde. But there may be a "good enough" solution here that solves the local case.Comment on 2017-10-31T03:06:41+0000 by Dan Helfman.
Okay, this should be fixed for real now for
repositories
(just released). Take it for a spin and let me know whether it works for you.Comment on 2017-11-03T05:38:13+0000 by Dan Helfman.
Thanks, it's no longer erroring on the config! :-)
I am now however getting a different error, hopefully something silly on my part:
[Errno 2] No such file or directory: '/etc/borgmatic.d'
Comment on 2017-11-03T14:31:16+0000 by Sam A. Horvath-Hunt.
Huh, that's super odd, because there's code to explicitly support
/etc/borgmatic.d
not existing. What config paths are you specifying on the borgmatic command-line, if any (it'd be with-c
or--config
)? Also, if you add-v 2
to the borgmatic run, then what log output comes immediately before that error?And here's one additional thing you can try if you'd like to debug: Open a Python shell (run
python
), and then type:That should output
'/etc/borgmatic.d'
. If it doesn't, then something's really wacky.Comment on 2017-11-04T03:14:32+0000 by Dan Helfman.
Curiously, adding the
-c
parameter and the config path makes it work, but I don't think that was necessary before. Any idea why?Comment on 2017-11-05T10:48:58+0000 by Sam A. Horvath-Hunt.
It shouldn't be necessary.. Can you try some of the debugging steps outlined above and report back? That should help narrow down what might be going wrong. Thanks!
Comment on 2017-11-05T17:50:19+0000 by Dan Helfman.
These are the logs directly preceding the error:
Comment on 2017-11-07T10:49:48+0000 by Sam A. Horvath-Hunt.
Interesting. So it's collecting config paths without error, but then blowing up on trying to parse that (non-existent) configuration file. What is the output of that
os.path.realpath('/etc/borgmatic.d')
Python code from above? That will help narrow down how the collection code is failing to skip/etc/borgmatic.d
. Thanks for your patience here.Comment on 2017-11-09T05:39:45+0000 by Dan Helfman.
It gives this back:
'/private/etc/borgmatic.d'
No worries, appreciate the support. :-)
Comment on 2017-11-10T14:08:57+0000 by Sam A. Horvath-Hunt.
Aha! So that's the cause of this issue you're seeing: The paths aren't matching up and so
/etc/borgmatic.d
isn't excluded from the config paths to load. I'll see if I can cook up a work-around.Comment on 2017-11-11T05:05:48+0000 by Dan Helfman.
Okay, I just put out a release with a potential fix: borgmatic 1.1.11. Give it a shot and let me know how it goes!
Comment on 2017-11-11T05:31:46+0000 by Dan Helfman.
Works a charm, thanks!
Comment on 2017-11-14T09:41:07+0000 by Sam A. Horvath-Hunt.
Glad to hear it!
Comment on 2017-11-15T06:17:21+0000 by Dan Helfman.