Hi everyone, I’m struggling with a strange behavior with restic and rest server as repository on a CentOS 6 vm.
I usually schedule restic with cron using a syntax like that in /etc/crontab
00 01 * * * root . /root/.restic.conf ; /bin/restic backup --quiet --exclude-caches --exclude=proc --exclude=dev --exclude=sys /
In /root/.restic.conf file I export RESTIC_PASSWORD and RESTIC_REPOSITORY environment variables.
Recently I moved my restic repository from an nfs export to a rest server so my RESTIC_REPOSITORY changed from something like
/mnt/backup/restic-host to something like
On the server I wat to backup I added the CA certificate in the OS trust store and if I run from the bash some restic backup or snapshot command it works perfectly
My problem starts when restic runs as a cronjob, on every other server working in the same way works perfectly, on this one cron always return me errors like this:
Fatal: unable to open config file: client.Head: Head "https://username:***@restic-rest-server.local:8000/host/config": Tunnel or SSL Forbidden Is there a repository at the following location? rest:https://username:***@restic-rest-server.local:8000/host/
I thought that maybe it was some problem with my restic version, so I updated to the latest 0.12.1, but the problem persists.
Please note that if I mount via NFS the very same directory used by the rest server, the restic cron works perfectly with no errors at all.
I also tried to create a brand new repository (restic init) using the rest server, everything I launch from bash (as root) works perfectly, everything running via cron (as root) return this error.
Do you have any idea why returns this error?