Recent versions of Borg require the --encryption
option to initialize a repository.
Also, borg extract
needs an archive name and it extracts the backup in the current directory.
I have made a fix for this, please pull the borg-fixes
branch at http://git.ni.fr.eu.org/nicolas/propellor.git
.
Tested with borg version 1.1.9.
My haskell level is still not that great, I would love to get comments on my code.
Thanks.
pull failed
I wonder if perhaps you forgot to run
git update-server-info
? Or possibly this is just not an url that actually points to the raw git repo, it looks like a gitweb installation and gitweb does not serve git repos IIRC.Hardcoding
BORG_PASSPHRASE
into a propellor configuration does not seem good. It could usewithPrivData
to get the passphrase.If
latestArchive
didn't work, it should probably display awarningMessage
rather than just failing with no indication why.There is the small problem that borg 1.0.9 is in debian oldstable and if someone were using propellor with it, which is supported, the changes to extraction would break that. Not as bad as extraction currently being broken for everyone with a current version of borg though! But, it would be easy to at least detect the old version and refuse to use it to restore. Either by borg --version or by using withOS and to match against the debian version, like Propellor.Property.Systemd.machined does.
HEAD was pointing to a non-existant master branch, sorry about that.
I will try to fix the other issues, thanks for the review.
Hello, I updated my branch with:
Not sure if it was clear: the restored function did not work either on borg 1.0.9 before my changes.
Tested on buster and stretch.
I've merged your branch, thanks.
It does seem to me that Borg.init could do the privdata lookup itself, and set
BORG_PASSPHRASE
. Otherwise the user is currently left with no indication of how to do that, except for the commit message afab5b2f0b4e06a5c41f064d10f65ead063ab5af.And, for BorgEncRepokey and BorgEncKeyfile, wouldn't backup and restore also need the passphrase to be provided?
(I don't think these questions need to delay releasing propellor with your fixes, since AFAICS your changes won't impact anything that worked with propellor before.)
Actually I have no idea how to implement the privdata for init, restored and backup in a sane way, so I will let this challenge for someone else
Thanks for the merge.