bareos
bareos copied to clipboard
Wrong timezone within container
Hello,
Iam running the latest container of bareos-director and added in the compose file the following volumes in order to get time and timezone in sync with the host system:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
However, the container still is running UTC time and therefore backups are started on the clients 2 hours later than scheduled due to the wrong timezone.
What is the proper procedure in your setup to correct that ?
Thx, Ludwig
Hello Ludwig, This is the good way to setup your own timezone i think 👍 Maybe it should be added by default in all compose file !
I can confirmed that the package tzdata is being installed in 21-alpine, so we can just set an env var called TZ and we can get local time in the box.
On the other hand, images like fd and sd don't have tzdata installed, so mounting /etc/timezone won't help getting the local time in the box. So adding tzdata inside the Dockerfile is a good idea.