Closed
Description
Rudimentary investigation shows that the timezone stored in the meta files is not useful for cleanup for some zones:
$ date
Tue May 7 03:44:38 UTC 2019
$ grep Timezone server.foo.com-meta-2019-05-07.tar.gz
Timezone: NZST
$ TZ=NZST date
Tue May 7 03:44:43 NZST 2019
Which gives problems with cleanup:
omnipitr-backup-cleanup : ERROR : When processing meta file (server.foo.com-meta-2019-05-07.tar.gz): $VAR1 = {
omnipitr-backup-cleanup : ERROR : 'started-epoch' => '1557181801',
omnipitr-backup-cleanup : ERROR : 'timezone' => 'NZST',
omnipitr-backup-cleanup : ERROR : 'hostname' => 'server.foo.com',
omnipitr-backup-cleanup : ERROR : 'min-xlog' => '0000000100000000000000CC',
omnipitr-backup-cleanup : ERROR : 'file_name' => 'server.foo.com-meta-2019-05-07.tar.gz'
omnipitr-backup-cleanup : ERROR : };
omnipitr-backup-cleanup : ERROR : , regenerated filename was incorrect: server.foo.com-meta-2019-05-06.tar.gz. Ignoring metafile.
Very dirty hack to work around this was to symlink the short names to NZ
:
# ls -l /usr/share/zoneinfo/NZ*
-rw-r--r-- 1 root root 2460 Mar 27 20:34 /usr/share/zoneinfo/NZ
lrwxrwxrwx 1 root root 2 May 7 03:25 /usr/share/zoneinfo/NZDT -> NZ
lrwxrwxrwx 1 root root 2 May 7 03:25 /usr/share/zoneinfo/NZST -> NZ
Which allows usage of NZST and NZDT zones:
$ date
Tue May 7 03:50:51 UTC 2019
$ TZ=NZST date
Tue May 7 15:50:52 NZST 2019
I'm guessing that something a little more robust than perl's localtime
and %Z
will be required to correctly check timestamps?
Metadata
Metadata
Assignees
Labels
No labels