refactor(docs): Add warning about simple snapshot names (#1)
This commit is contained in:
parent
d027966ed3
commit
204a2a49b1
20
README.md
20
README.md
@ -157,7 +157,25 @@ This behavior is not configurable. During testing and development we considered
|
|||||||
...2023-03-07-0116-2...
|
...2023-03-07-0116-2...
|
||||||
...2023-03-07-0116-3...
|
...2023-03-07-0116-3...
|
||||||
```
|
```
|
||||||
While this would effectively avoid naming collisions we decided against it. Weighing pros and cons the _skip_ approach seems ever so sleightly simpler than the _counter_ approach.
|
While this would effectively avoid naming collisions we decided against it. Weighing pros and cons the _skip_ approach seems ever so slightly simpler than the _counter_ approach.
|
||||||
|
|
||||||
|
## A word of warning
|
||||||
|
|
||||||
|
Note that skipping snapshot creation to avoid naming collisions can become overly dangerous if you strip away too many unique features from snapshot names. This may happen mostly in two ways:
|
||||||
|
1. Remove the package name list by setting `pkgs_list_max_length='0'`.
|
||||||
|
1. Remove distinguishing characters from timestamps via `snap_date_format='%F-%H%M'`
|
||||||
|
|
||||||
|
Without a package list two consecutive snapshots may look like so:
|
||||||
|
```
|
||||||
|
zpool/root/archlinux@pacman_2023-03-07-0116_op:inst_sev:trv
|
||||||
|
zpool/root/archlinux@pacman_2023-03-07-0116_op:upgr_sev:trv
|
||||||
|
```
|
||||||
|
If you then install any unrelated package within the same minute the `pacman` operation will be treated as identical to line 1 and this script will skip snapshot creation. Similarly if you lower timestamp fidelity to e.g. `%Y%m%d` (`20230307` instead of `2023-03-07-0116`) above example snapshots will look like so:
|
||||||
|
```
|
||||||
|
zpool/root/archlinux@pacman_20230307_op:inst_sev:trv
|
||||||
|
zpool/root/archlinux@pacman_20230307_op:upgr_sev:trv
|
||||||
|
```
|
||||||
|
All future _Install_ or _Upgrade_ operations within the same day will then also not be covered by snapshots. While this script will print warnings when it skips snapshot creation we suggest you change `pkgs_list_max_length` and `snap_date_format` options carefully. Defaults have proven to work well on example daily driver systems.
|
||||||
|
|
||||||
# Rollback
|
# Rollback
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user