How do you deal with hourly snapshots and "fall time"? [File exists auto-hourly-hdd-2023-10-29_02-05]

probain

Patron
Joined
Feb 25, 2023
Messages
211
Today I woke up to two alerts from both my pools. Saying that their recursive snapshots couldn't be taken, due to File Exists. This is due to Sweden just falling back one hour to non-daylight savings time.
I tried adding '%s' into the naming scheme. But this wasn't an accepted due to me wanting to easily distinguish the actual date the snapshot is from.
Code:
auto-hourly-hdd-%Y-%m-%d_%H-%M-%s

No other placeholder can be used with %s in naming schema

My question is:
How do you deal with situations like this? Or do you just accept that once a year, an hourly snapshot will just 'fail'?
 

420schorsch

Cadet
Joined
Oct 29, 2023
Messages
1
Same here. Alert at 02:01 CEST (after switch from CEST to CET) that hourly and monthly snapshot failed due to a snapshot of the same name already existing. I guess the monthly could be timed better on my end, or is there a way to use UCT for snapshot naming?

More worrying is now my pool has been marked degraded, because of "persistent errors" on one drive. Not sure yet if or how that is connected, but timing seems too convenient...
 

duncandoo

Cadet
Joined
Mar 5, 2022
Messages
9
I got the same error from the change to GMT from BST in the UK. The following error message awaited me this morning:

Snapshot Task For Dataset "appsPool/ix-applications" failed: cannot create snapshot 'appsPool/ix-applications@auto-2023-10-29_01-00': dataset already exists no snapshots were created...
2023-10-29 01:00:00 (Europe/London)
...and one more the same for every dataset .

I'm running TrueNAS-SCALE-22.12.4.2. I set up daily snapshots to occur at 0100. This was the default wizard driven settings that seemed sensible. The default is to name the snapshot automatically with the time and date, which uses the local time. This seems to be a known thing.

Last night daylight savings ended here in the UK, and the routine is that at 0200 BST, the clocks skip back to 0100 GMT. So there are two 0100's on that night - the one at 0100 BST, and then an hour later at 0100 GMT.

There seem to be several possible solutions. Since I'm using the default settings I'm wondering if this affects others, and should be changed somewhere other than just my system? My question is what is the neatest solution to this?

Options seem to be:
* schedule to trigger the snapshot when there are never two of the same times, say 0205 (do all daylight savings zones end at 0100?);
* have the trigger timing from UTC (annoying if you live far away from Greenwich and have to remember to schedule it for 1300UTC or whatever);
* have the trigger timing from the local standard time all year, ignoring daylight savings (not sure how to do that?);
* have the autonaming of files include the timezone, so different file names are created (then you ahve two snapshots just an hour apart on the same day).
 
Top