Giter VIP home page Giter VIP logo

Comments (7)

honza801 avatar honza801 commented on July 4, 2024

...attaching zfs list output

# zfs list
NAME                                            USED  AVAIL  REFER  MOUNTPOINT
zpool                                           673G  2.02T    32K  /mnt/zpool
zpool/backupdata                                648G  2.02T   648G  /jail/backup/mnt/backups
zpool/jail                                     9.44G  40.6G    38K  /jail
zpool/jail@2012-03-26_17.21.00--3m                 0      -    38K  -
zpool/jail/backup                              1024M  40.6G  1021M  /jail/backup
zpool/jail/backup@2012-03-26_17.21.00--3m      3.02M      -  1021M  -
zpool/jail/honeypot                             414M  40.6G   411M  /jail/honeypot
zpool/jail/honeypot@2012-03-26_17.21.00--3m    2.46M      -   411M  -
zpool/jail/ldapradius                          1.73G  40.6G  1.69G  /jail/ldapradius
zpool/jail/ldapradius@2012-03-26_17.21.00--3m  44.5M      -  1.63G  -
zpool/jail/snort                               2.97G  40.6G  2.60G  /jail/snort
zpool/jail/snort@2012-03-26_17.21.00--3m        379M      -  2.60G  -
zpool/jail/syslog                              1.03G  40.6G   651M  /jail/syslog
zpool/jail/syslog@2012-03-26_17.21.00--3m       405M      -   909M  -
zpool/jail/webs                                2.31G  40.6G  2.07G  /jail/webs
zpool/jail/webs@2012-03-26_17.21.00--3m         239M      -  2.08G  -
zpool/test                                      486K  2.02T   141K  /mnt/zpool/test
zpool/test@2012-03-26_17.21.00--3m                 0      -    33K  -
zpool/test@daily-2012-03-27_03.14.00--3d           0      -    33K  -
zpool/test@daily-2012-03-28_03.14.00--3d           0      -    33K  -
zpool/test@daily-2012-03-29_03.14.00--3d           0      -    33K  -
zpool/test/a                                    277K  2.02T   122K  /mnt/zpool/test/a
zpool/test/a@2012-03-26_17.21.00--3m               0      -    31K  -
zpool/test/a@daily-2012-03-27_03.14.00--3d         0      -    31K  -
zpool/test/a@daily-2012-03-28_03.14.00--3d       47K      -    60K  -
zpool/test/a@daily-2012-03-29_03.14.00--3d       89K      -   102K  -
zpool/test/b                                     49K  2.02T    31K  /mnt/zpool/test/b
zpool/test/b@2012-03-26_17.21.00--3m               0      -    31K  -
zpool/test/b@daily-2012-03-27_03.14.00--3d         0      -    31K  -
zpool/test/b@daily-2012-03-28_03.14.00--3d         0      -    31K  -
zpool/test/b@daily-2012-03-29_03.14.00--3d         0      -    31K  -
zpool/tmp                                       107K  1024M   107K  /tmp
zpool/usr                                      4.14G  5.86G  3.44G  /usr
zpool/usr/ports                                 721M  5.86G   721M  /usr/ports
zpool/var                                      79.6M  3.92G  79.6M  /var

from zfsnap.

graudeejs avatar graudeejs commented on July 4, 2024

-D means to delete All snapshots of given pool.

-d and -F 1d means to delete all snapshot older than 1 day

Currenty there is no way to delete snapshot of given pool that are older by specified time. I suppose this should be implemented.
You can either delete ALL snapshot of given pool. Or delete all snapshots of all pools that are older then specified time (or ttl).

from zfsnap.

honza801 avatar honza801 commented on July 4, 2024

thanks for reply

i'm looking forward to this feature

jan

from zfsnap.

aqw avatar aqw commented on July 4, 2024

I agree that this should be implemented, but actually making the change has some pretty big implications. I'm not so sure what is the best method of doing this. In no particular order:

  1. Currently, zfSnap can both delete and create snapshots in the same invocation. Change the behavior so that "create" is the default mode and using -d or -F switches to "delete" mode. -d and -F can remain in general options, but any zpools/zvols defined will be checked for deleting rather than snapshotted. This breaks current behavior.

  2. Simply add two new flags to the "pool options" that mimic the behavior of -d and -F, and deprecate -d and -F. This is the most conservative approach and doesn't break anything, but -d and -F are so intuitive, I can't think of other intuitive flags for these operations. -D is already used, so we can't simply capitalize.

  3. Migrate -d and -F from "general options" to "pool options." Also create a "snapshotting flag" (say -c, for create). These would behave the same as the other pool options, where the "create" mode or "delete" mode would remain in effect for all subsequent zpools until overridden. This would be a major syntax change and would break current behavior.

I personally don't like that zfSnap currently implies the creation of snapshots. The mode is never actively declared, and when delete mode is declared, it still creates a snapshot on any zpool passed as an argument. I personally prefer options 1 or 3. It solves this feature request and makes the behavior of zfSnap more explicit.

Thoughts?

---Alex

from zfsnap.

graudeejs avatar graudeejs commented on July 4, 2024

Or we could rewrite zfsnap to support human readable commands like:

zfSnap snap ...
zfSnap delete ...

This will break syntax, but that doesn't bother me too much.
This however would open door for other functionality that can be lated added

For example #20 may as well become

zfSnap send .... or something like that

from zfsnap.

aqw avatar aqw commented on July 4, 2024

I like that approach, of using human readable commands. When the syntax changes, just bump to version 2.

So, zfSnap would have distinct modes. snap, delete, send, etc. No mixing and matching modes in the same call. How does that sound?

---Alex

from zfsnap.

graudeejs avatar graudeejs commented on July 4, 2024

Sounds good to me.

from zfsnap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.