amdump reports nonexistent log files due to timezone error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
amanda (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
A run of amdump generated a report (captured in e-Mail) with the NOTES entry
planner: client0004 sda1 20180720004501 0 "/usr/lib/
status 1: see /var/log/
The file /var/log/
The file /var/log/
Note that the timestamp of the note is 20180720004501. The timestamps in the two filenames differ by exactly 5 hours.
Cause: The server Amanda backup user is in the UTC timezone.
backup@server:~$ timedatectl
Local time: Fri 2018-07-20 02:33:32 UTC
Universal time: Fri 2018-07-20 02:33:32 UTC
RTC time: Fri 2018-07-20 02:33:33
Time zone: Etc/UTC (UTC, +0000)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
The client Amanda backup user is in the CDT timezone.
backup@client:~$ timedatectl
Local time: Thu 2018-07-19 21:33:33 CDT
Universal time: Fri 2018-07-20 02:33:33 UTC
RTC time: Fri 2018-07-20 02:33:32
Time zone: America/Chicago (CDT, -0500)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
There is a 5 hour difference between the two local times. (The two timedatectl invocations were hand generated, so the 1 second difference is user induced.)
Consequence: Amdump uses the local time at the client to determine the timestamp used in the log file name in the report, but uses the local time at the server to determine the name of the log file on disk. As a consequence, the amdump report references nonexistent files.
Follow-on consequence: In a sufficiently busy Amanda environment, with a little coincidental timing (not so rare, given how *crons work), the log file referenced in the report can actually be the log file for an unrelated backup event.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: amanda-server 1:3.3.6-4.1
ProcVersionSign
Uname: Linux 4.4.0-77-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Fri Jul 20 02:25:44 2018
InstallationDate: Installed on 2014-12-18 (1310 days ago)
InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.3)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: amanda
UpgradeStatus: Upgraded to xenial on 2016-08-09 (709 days ago)