#1699 Issue closed: Rear with Borg - no umask variable.

Labels: enhancement, fixed / solved / done

pavl00 opened issue at 2018-01-21 22:13:

Relax-and-Recover 2.3 / 2017-12-20
borg 1.1.4

When using Borg there is no option to set umask variable.
Default it is 077, so there is a problem when few users try use one borg repository.

To resolve this issue:
add new variable: BORGBACKUP_UMASK
and set it correctly in borg_set_vars function.

gozora commented at 2018-01-22 07:43:

Just a guess, but did you try to set umask in your local.conf ?

V.

pavl00 commented at 2018-01-22 08:21:

Yes. I tried to set BORGBACKUP_UMASK="0007" and a few more combinations (including system environment variables) but I see that rear uses only a few BORGBACKUP_XXX variables to compose borg command line options.
When borg is run without --umask option it uses default 077 and moreover it is passing it to borge serve (if run through ssh). And it doesn't matter if borg backup repository was created with different umask

gozora commented at 2018-01-22 08:57:

OK, I see your point now.
I'll write a patch for this.

V.

gozora commented at 2018-01-22 18:32:

@pavl00 feel free to test https://github.com/gozora/rear/tree/borg_umask, for changes related to Borg umask ...

If there will be no objections, this code will be merged in couple of days into ReaRs upstream.

V.

pavl00 commented at 2018-01-22 23:49:

Yes it works with borg create.
But as I can see now --umask must be used in all repo related borg commands, here in rear: create,prune, init(probably).

gozora commented at 2018-01-23 06:45:

Hmm, I've forgotten about borg prune ..., thanks for reminding me!
I'll add it later today.

V.

gozora commented at 2018-01-23 15:45:

@pavl00 I've added BORGBACKUP_UMASK for borg prune ....

I'll wait ~24 hours and do the merge, if no other issues arise.

V.

pavl00 commented at 2018-01-23 22:47:

ok, it works properly now. Thanks!

gozora commented at 2018-01-24 19:00:

With #1700 merged, this issue can be closed.


[Export of Github issue for rear/rear.]