olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 756 forks source link

Add flag to generate backup filenames in UTC #679

Closed StrayCatDBA closed 4 days ago

StrayCatDBA commented 2 years ago

Filename tokens are currently based on local time. Add a parameter '@UseUTC bit' that bases tokens on UTC time.

This would allow easier integration of the Backup Solution into custom Log Shipping setups as sqllogship.exe uses the filename to determine restore latency.

olahallengren commented 1 week ago

There is another similar request, #839

olahallengren commented 1 week ago

I am looking at implementing this.

I am thinking about calling the parameter @TimestampTokensInUTC to make it more clear that it will only affect the tokens, not the logging.

olahallengren commented 6 days ago

I have a test version. https://github.com/olahallengren/sql-server-maintenance-solution/pull/840

You can pass a parameter like this: @TokenTimezone = 'UTC'

olahallengren commented 1 day ago

This has been released.

Here is the documentation: https://ola.hallengren.com/sql-server-backup.html#TokenTimezone