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

Dry Run Output shows wrong units #24

Open
furicle opened this issue May 22, 2024 · 2 comments
Open

Dry Run Output shows wrong units #24

furicle opened this issue May 22, 2024 · 2 comments

Comments

@furicle
Copy link

furicle commented May 22, 2024

If I ask to prune a number of days, it correctly picks the snapshots to remove, but labels them all '1 week old' rather than 'X days old'

»»»» date
Wed 22 May 2024 10:03:24 AM EDT
»»»» zfs-prune-snapshots -n -R 10d
found 28 snapshots (165 GB) on pools: <all>
[dry-run] [1/28] removing tank/backup@autosnap_2024-05-09_18:02:17_daily: 1 week old (56 KB)
[dry-run] [2/28] removing tank/backup@autosnap_2024-05-10_00:00:20_daily: 1 week old (0 B)
[dry-run] [3/28] removing tank/backup@autosnap_2024-05-11_00:00:17_daily: 1 week old (0 B)
[dry-run] [4/28] removing tank/backup@autosnap_2024-05-12_00:00:27_daily: 1 week old (56 KB)
#snipped...
@bahamas10
Copy link
Owner

This is expected - all of those datasets are between 1 and 2 weeks old. are you just saying you'd prefer to not have "week" granularity and just print days?

@furicle
Copy link
Author

furicle commented Nov 25, 2024

I guess what I'm saying is I'd like the scale on the output to be same scale I used. e.g. if I used days, the output is in days. If I used weeks, the output is in weeks.

Maybe I'm being a bit picky here, but when I'm deleting stuff I get paranoid, and I found the rounding extra work to untangle in my brain :-)

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

No branches or pull requests

2 participants