What’s this new format for specifying snapshot lifetimes?

ændrük

Cadet
Joined
Apr 11, 2014
Messages
7
The default snapshot lifetime in 12.0-U3 is 2 WEEKS, which contradicts the help text. I assume the help text is just outdated. How does this new format work? What units are supported, etc.? What happens if I use the old format?

I suppose I could just guess, but I’d be much more comfortable seeing it explicitly documented. I tested entering an obviously invalid value and it didn’t show any error message so I’m a little spooked.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Let's turn the question into a specific question about what you are trying to do, what the documentation says and what you have tried.

It not easy to work out the specific issue. Yes, you should use the format documented... not a previous format. If the documentation is incorrect, we'd like to resolve that. If incomplete, its also useful to know.
 
Joined
Oct 22, 2019
Messages
3,641
Just tried this on 12.0-U3.

It does indeed default to 2 WEEKS.

However, you are not restricted in using only "h" or "d" or "w" or "m" or "y".

Try typing expiration times like the examples below, as it seems to accept natural language input:

Code:
8h ENTER

12 Weeks ENTER

6 w ENTER

1 year ENTER

6 Month ENTER

8months ENTER

5hours ENTER

12h ENTER


With different combinations of capitalization and spaces, whether plural or singular, it seems to do a good job at selecting the correct unit of time.

I will admit that I think a drop-drown menu would work better, as it would look more polished and prevent mistakes in manually typing in a unit of time.
 

ændrük

Cadet
Joined
Apr 11, 2014
Messages
7
what you are trying to do
Goal 1: Understand with confidence what values are valid
Goal 2: Publicly document the answer
Goal 3: Informally poll the community for context

what the documentation says
That the default value 2 WEEKS is invalid

and what you have tried

Goal 1Goal 2Goal 3
Try 1: Read the help text in TrueNASSetback; the help text is misleadingn/an/a
Try 2: Read the documentationSetback; the documentation is misleadingn/an/a
Try 3: GuessIncomplete; partial understanding with low confidencen/an/a
Try 4: Search the webNo findingsn/an/a
Try 5: Start this threadNo progress made; received misleading advice and blind guessesn/aPending, but now unhopeful
Try 6: Just read the source codeCompletedMinimally completed by linking you to where I found the answern/a

Thanks for your help.
 
Last edited:

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
The software has the flexibility to accepts many styles of input for snapshot lifetime. The following seems to be all valid
2 WEEKS
2 Weeks
2 weeks
2 w
2w or 2W

2 weeks seems like a reasonable default.
The "2w" syntax is the easiest and fastest to use.
The "2 WEEKS" syntax is the easiest for new users to understand.

I agree the help text and documentation could be improved. In particular, to mention syntax options and the allowable units of time (weeks is missing).

The documentation page can be edited as a contribution for faster fix. I'll let the doc team know to add it to their very long list.
 
Top