Skip to content

datetime: Re-implment backup/restore for timezone

Closes: #2326 (closed).

Earlier /etc/timezone was used to store timezone. Now, we use /etc/localtime symlink instead. Since the change, backup/restore for timezone has not been working. Implement this by backing up and restoring the new symlink. Borg understands symlinks so it properly backs them up and restore them.

When the symlink is restored, timedatectl does not immediately show the new timezone. This is because a DBus activated daemon 'systemd-timedated' which supplies the information for timedatectl needs to be reloaded. Add this service to list of services that backup framework needs to restart.

Tests:

  • Set a new timezone. Backup datetime app. Set another timezone. Restore the datetime app. Visiting the datetime app shows the restored timezone as expected and timedatectl on command line also immediately shows the expected timezone.

Signed-off-by: Sunil Mohan Adapa sunil@medhas.org

Merge request reports

Loading