Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request : update snapshot numbering #687

Open
renzhamin opened this issue Jan 23, 2022 · 4 comments
Open

feature request : update snapshot numbering #687

renzhamin opened this issue Jan 23, 2022 · 4 comments

Comments

@renzhamin
Copy link

A typical snapper config will have this kind of snapshot numbering

  # | Type   | Pre # | Date                            | User | Cleanup  | Description | Userdata
----+--------+-------+---------------------------------+------+----------+-------------+---------
 0  | single |       |                                 | root |          | current     |
33  | single |       | Sun 23 Jan 2022 03:01:01 PM +06 | root | timeline | timeline    |
34  | single |       | Sun 23 Jan 2022 04:01:01 PM +06 | root | timeline | timeline    |

The fact that a snapshot is the 34th snapshot taken by snapper doesn't seem to useful in any way.
What could be useful is, if it was numbered from 1 to n ordered by date, such as

  # | Type   | Pre # | Date                            | User | Cleanup  | Description | Userdata
----+--------+-------+---------------------------------+------+----------+-------------+---------
 0  | single |       |                                 | root |          | current     |
 1  | single |       | Sun 23 Jan 2022 03:01:01 PM +06 | root | timeline | timeline    |
 2  | single |       | Sun 23 Jan 2022 04:01:01 PM +06 | root | timeline | timeline    |

I have tried just renaming /.snapshot/# and changing /.snapshot/#/info.xml accordingly, while I can delete as usual using the modified number but that snapshot no longer appears on the output of

snapper -c root list

There could be an option such as

snapper -c root update-numbering

and an option to do this automatically after cleanup

@aschnell
Copy link
Member

One problem is that the number is can be used in the description (see http://snapper.io/2017/05/10/automatic-cleanup-after-rollback.html).

@aschnell
Copy link
Member

There are even request to not reuse deleted numbers (see github.com//issues/131).

@renzhamin
Copy link
Author

There are even request to not reuse deleted numbers (see github.com//issues/131).

I can see, this simplifies things for folks doing backup to external drive, but for those using local backup only, keeping the number consecutive is much cleaner and its not like anyone's losing anything, because current method will still be the default and those who want to use deleted numbers will run update-numbering command manually or enable the option to do it after cleanup

@twojstaryzdomu
Copy link

twojstaryzdomu commented Feb 14, 2022

For all it's worth, it should be possible to change the numbering as needed. I'd like to have my initial snapshot numbered at 1, following an upgrade for instance. High numbers can become unmanageable so the ability to reset the sequence as needed is crucial. At present, it's not possible without messing with snapper's setup by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants