vbr backup timestamp
mpo
Vertica Customer ✭
Hi,
I run vbr (from crontab) at midnight to backup database.
Overything is ok, but timestamp in filename shows moment two hours earlier:
drwxr-xr-x 3 dbadmin verticadba 4096 Aug 27 00:02 backup_snapshot_20200826_220121
drwxr-xr-x 3 dbadmin verticadba 4096 Aug 28 00:02 backup_snapshot_20200827_220133
In sql is also fine:
dbadmin=> SELECT backup_timestamp FROM v_monitor.database_backups order by backup_timestamp desc;
backup_timestamp
2020-08-28 00:03:16.80799+02
2020-08-27 00:03:02.712029+02
It looks like timestamp is from UTC and everything else works in UTC+2. Is it normal?
-bash-4.1$ id
uid=44787(dbadmin) gid=31002(verticadba)
-bash-4.1$ env|grep TZ
TZ=Europe/Paris
0
Answers
Take a peak at the doc page "Using Time Zones With Vertica" here:
https://www.vertica.com/docs/latest/HTML/Content/Authoring/InstallationGuide/AppendixTimeZones/UsingTimeZonesWithVertica.htm
And the "TIMESTAMP/TIMESTAMPTZ" doc page:
https://www.vertica.com/docs/latest/HTML/Content/Authoring/SQLReferenceManual/DataTypes/Date-Time/TIMESTAMP.htm
Note: The BACKUP_TIMESTAMP column in the DATABASE_BACKUPS system table is a TIMESTAMP.