Get Virtualizor

Backup Time Issues

Overview

      The automatic backups process are not starting when they should, according to the backup schedule. Instead of running on time, the backups are happening at unscheduled times.
Note
- The cron file will only exist on the master server and will execute tasks as per the master's time.
- Setting the timezone on the panel will not change the server's system time; it will merely display the time according to the chosen timezone.
Information to check :
To troubleshoot, examine these logs:
- System logs**: `/var/log/messages` or `/var/log/syslog`
- Cron job logs**: `/var/log/cron`
- Virtualizor backup cron file**: `/etc/cron.d/virtualizor-backups-b1`   (Here b1 is the Backup Plan ID)

Check for time inconsistencies in the logs to ensure scheduled tasks are executing as expected.

If your system's log timestamps differ from the server time displayed by `timedatectl`, it indicates a mismatch in time settings. This can be caused by:
- `rsyslog` using a different time format.
- Incorrect system timezone settings.
- NTP (Network Time Protocol) not syncing properly.

Steps to Resolve

Check the Server Log Current Time

Logs may use a different format that excludes explicit timezones. Add a test log message and verify timestamps:

logger "Test log message"
tail -n 10 /var/log/messages

If the log timestamp doesn't match the system time (`timedatectl`), it is likely using local time.

Verify and Configure the System Timezone

Ensure the system is configured with the correct timezone:
ls -l /etc/localtime
If the output doesn't point to `/usr/share/zoneinfo/UTC`, update it:
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
Restart logging services:
systemctl restart rsyslog

Confirm NTP Synchronization

NTP ensures the system clock is accurate. Verify current time settings:

timedatectl status
ntpq -p # If using NTP
date # Check current system time

If the clock is out of sync, reset NTP:

timedatectl set-ntp off
timedatectl set-ntp on

Conclusion

If server log timestamps (e.g., `/var/log/messages`, `/var/log/syslog`) differ from the system time, the root cause likely lies in incorrect NTP synchronization. Proper configuration of the NTP service should resolve these discrepancies.

    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list