#1148 PR merged: Bareos support: add missing directory /var/run/bareos in recovery system

Labels: bug, fixed / solved / done, external tool

dl5rcw opened issue at 2017-01-03 14:11:

we are using rear + bareos in our data center.
executing a test recovery revealed that bareos was requesting /var/run/bareos as a system's directory to exist. We've added it to the skel and it works now. We like to share this improvement.

jsmeix commented at 2017-01-03 14:38:

@dl5rcw
what Bareos version do you use?
I am not a Bareos user but I think ReaR has worked with
some older Bareos versions without the /var/run/bareos
directory in the ReaR recovery system.

According to
https://github.com/rear/rear/pull/1148/files
you added not only a
usr/share/rear/skel/BAREOS/var/run/bareos
directory but a
usr/share/rear/skel/BAREOS/var/run/bareos/.gitignore
file.
I assume it also works this way but I think
this is not exactly what you intended.

jsmeix commented at 2017-01-03 14:42:

See also issues with newer Bareos version like
https://github.com/rear/rear/issues/1077
and
https://github.com/rear/rear/issues/1117
and
https://github.com/rear/rear/pull/1122

dl5rcw commented at 2017-01-03 14:52:

I am using Bareos obelix-dir 16.2.2 (01May16) compiled from source on all machines.
Adding an empty directory to git repo failed. I inserted the .gitignore file alike the empty directory https://github.com/rear/rear/tree/master/usr/share/rear/skel/BAREOS/etc/bareos

gdha commented at 2017-01-03 15:08:

@dl5rcw Indeed empty directories do require a .gitignore file to be accepted by git. OK for me to accept.

jsmeix commented at 2017-01-03 15:23:

I even found the explanation about empty directories and git at
http://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository

@gdha
I see ReaR mostly has empty directories
with a .gitignore file that contains

*
!.gitignore

which guarantees that the directory remains empty because
this way git ignores all files except the .gitignore file
but
those .gitignore files are empty
usr/share/rear/skel/NBU/usr/openv/var/vnetd/.gitignore
usr/share/rear/skel/NSR/usr/lib/nsr/.gitignore
usr/share/rear/skel/default/run/lvm/.gitignore
usr/share/rear/skel/default/run/resolvconf/.gitignore
usr/share/rear/skel/default/run/systemd/journal/syslog/.gitignore
usr/share/rear/skel/default/run/udev/.gitignore
usr/share/rear/skel/default/usr/include/.gitignore
usr/share/rear/skel/default/usr/lib/udev/.gitignore
usr/share/rear/skel/default/var/lib/nfs/statd/.gitignore
usr/share/rear/skel/default/var/lock/lockdev/.gitignore
usr/share/rear/skel/default/var/lock/lvm/.gitignore
usr/share/rear/skel/default/var/run/systemd/generator/.gitignore
usr/share/rear/skel/default/var/run/systemd/journal/.gitignore

Should I fix the empty .gitignore files?
(The directories where they are are empty.)

gdha commented at 2017-01-03 15:46:

OK - it won't hurt ReaR ;-)

On Tue, Jan 3, 2017 at 4:23 PM, Johannes Meixner notifications@github.com
wrote:

I even found the explanation about empty directories and git at
http://stackoverflow.com/questions/115983/how-can-i-
add-an-empty-directory-to-a-git-repository

@gdha https://github.com/gdha
I see ReaR mostly has empty directories
with a .gitignore file that contains

!.gitignore

which guarantees that the directory remains empty because
this way git ignores all files except the .gitignore file
but
those .gitignore files are empty
usr/share/rear/skel/NBU/usr/openv/var/vnetd/.gitignore
usr/share/rear/skel/NSR/usr/lib/nsr/.gitignore
usr/share/rear/skel/default/run/lvm/.gitignore
usr/share/rear/skel/default/run/resolvconf/.gitignore
usr/share/rear/skel/default/run/systemd/journal/syslog/.gitignore
usr/share/rear/skel/default/run/udev/.gitignore
usr/share/rear/skel/default/usr/include/.gitignore
usr/share/rear/skel/default/usr/lib/udev/.gitignore
usr/share/rear/skel/default/var/lib/nfs/statd/.gitignore
usr/share/rear/skel/default/var/lock/lockdev/.gitignore
usr/share/rear/skel/default/var/lock/lvm/.gitignore
usr/share/rear/skel/default/var/run/systemd/generator/.gitignore
usr/share/rear/skel/default/var/run/systemd/journal/.gitignore

Should I fix the empty .gitignore files?
(The directories where they are are empty.)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rear/rear/pull/1148#issuecomment-270138443, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA2POZHNDYqM5GrG0YHILnfnujsxU3wtks5rOmfqgaJpZM4LZpsr
.


[Export of Github issue for rear/rear.]