I have one remote server with dead MB battery and with reboot time is off. When I do timedatectl it shows NTP service: inactive, when I do timedatectl set-ntp yes it will sync time after some time. But I checked and didn’t find ntpdate nor chrony nor systemd-timesyncd.service is not enabled or installed. So how does the system sync time? I’m asking as I want to put it in startup script to run sync time remotely on boot if time is reset.
Thanks
I don’t have cronyd service, neither crony program, nor /etc/cronyd.conf… also /usr/lib/systemd/system/cronyd.service just crond.service which is crontab AFAIK
All these answers were about syncing time.
In your first post you indicated that you have a dead MB battery.
Those batteries are inexpensive and easy to replace so the simplest fix seems to be replace the battery, reset the time in BIOS, then the problem will go away since the RTC will now keep time instead of dying and needing reset.
Yes Jeff, but the the server is in remote location, so I can’t go there, and I have to work within software, for now, until it is changed.
The remote server is certainly an issue.
Is there no one local to the server who could do the hardware fix for you?
A 10 minute downtime on that server and the problem is eliminated at the source instead of trying to do a software workaround.
Sure it’s an easy fix, but no one technical there, besides it can create more problems if they mess up something, and better to do it my self when I go there next time. In the mean time I’ve added routine to script that runs every 5min to put current time in some file, and on reboot, if time less then in file it will update it from the file, until synced remotely. But I couldn’t find the way to sync it remotely manually from the script.
systemd-timed has a file which records the latest known time, and this file is used to set the time on the next boot.
You can run it instead of chrony or ntp.
