Haiou Fu (Kevin)
2008-Sep-10 20:01 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
I wonder if there are any equivalent commands in zfs to dump all its associated snapshots at maximum efficiency (only the changed data blocks among all snapshots)? I know you can just "zfs send" all snapshots but each one is like a full dump and if you use "zfs send -i" it is hard to maintain the relationship of the snapshots. In NetApp filer, I can do "snapmirror store /vol/vol01 ..." then everything in /vol/vol01 and all of its snapshots will be mirrored to destination, and it is block level which means only the changes in snapshots are sent out. So I wonder if there is an equivalent for ZFS to do similar things: For example: given one zfs: diskpool/myzfs, it has n snapshots: diskpool/myzfs at 1, diskpool/myzfs at 2,...... diskpool/myzfs at n, and if you just do "zfs < magic subcommands> diskpool/myzfs ..." and it will dump myzfs and all its n snapshots out at maximum efficiency (only changed data in snapshots) ? Any hints/helps are aprreciated! -- This message posted from opensolaris.org
Richard Elling
2008-Sep-10 20:16 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
Haiou Fu (Kevin) wrote:> I wonder if there are any equivalent commands in zfs to dump all its associated snapshots at maximum efficiency (only the changed data blocks among all snapshots)? I know you can just "zfs send" all snapshots but each one is like a full dump and if you use "zfs send -i" it is hard to maintain the relationship of the snapshots. > > In NetApp filer, I can do "snapmirror store /vol/vol01 ..." then everything in /vol/vol01 and all of its snapshots will be mirrored to destination, and it is block level which means only the changes in snapshots are sent out. > > So I wonder if there is an equivalent for ZFS to do similar things: > For example: given one zfs: diskpool/myzfs, it has n snapshots: > diskpool/myzfs at 1, diskpool/myzfs at 2,...... diskpool/myzfs at n, > and if you just do "zfs < magic subcommands> diskpool/myzfs ..." and it will dump myzfs and all its n snapshots out at maximum efficiency (only changed data in snapshots) ? > > Any hints/helps are aprreciated! >zfs send -I -- richard
Haiou Fu (Kevin)
2008-Sep-10 21:00 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
Can you explain more about "zfs send -l " I know "zfs send -i" but didn''t know there is a "-l" option? In which release is this option available? Thanks! -- This message posted from opensolaris.org
Haiou Fu (Kevin)
2008-Sep-10 21:24 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
The closest thing I can find is: http://bugs.opensolaris.org/view_bug.do?bug_id=6421958 But just like it says: " Incremental + recursive will be a bit tricker, because how do you specify the multiple source and dest snaps? " Let me clarify this more: Without "send -r" I need do something like this; Given a zfs file system "myzfs" in zpool "mypool", it has N snapshots: mypool/myzfs mypool/myzfs at 1 mypool/myzfs at 2 .... mypool/myzfs at N, Do following things: zfs snapshot mypool/myzfs at CURRENT zfs send mypool/myzfs at CURRENT | gzip - > /somewhere/myzfs-current.gz zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 1 | gzip - > /somewhere/myzfs-1.gz zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 2 | gzip - > /somewhere/myzfs-2.gz ...... zfs send -i mypool/myzfs at CURRENT mypool/myzfs at N | gzip - > /somewhere/myzfs-N.gz As you can see, above commands are kind of a stupid solution, and it didn''t reach maximum efficiency because those "myzfs-<1 ~ N>.gz" files contain a lot of common stuffs in them! I wonder how will "send -r" do in above situation? How does it choose multiple source and dest snaps? And can "-r" efficient enough to just dump the incremental changes? What is the corresponding receive command for "send -r"? (receive -r ? I guess? ) Thanks! -- This message posted from opensolaris.org
Richard Elling
2008-Sep-10 22:24 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
Haiou Fu (Kevin) wrote:> The closest thing I can find is: > http://bugs.opensolaris.org/view_bug.do?bug_id=6421958 >Look at the man page section on zfs(1m) for -R and -I option explanations. http://docs.sun.com/app/docs/doc/819-2240/zfs-1m?a=view> But just like it says: " Incremental + > recursive will be a bit tricker, because how do you specify the multiple > source and dest snaps? " > > Let me clarify this more: > > Without "send -r" I need do something like this; > > Given a zfs file system "myzfs" in zpool "mypool", it has N snapshots: > mypool/myzfs > mypool/myzfs at 1 > mypool/myzfs at 2 > .... > mypool/myzfs at N, > > Do following things: > > zfs snapshot mypool/myzfs at CURRENT > zfs send mypool/myzfs at CURRENT | gzip - > /somewhere/myzfs-current.gz > zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 1 | gzip - > /somewhere/myzfs-1.gz > zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 2 | gzip - > /somewhere/myzfs-2.gz > ...... > zfs send -i mypool/myzfs at CURRENT mypool/myzfs at N | gzip - > /somewhere/myzfs-N.gz > > As you can see, above commands are kind of a stupid solution, and it didn''t reach maximum efficiency because those "myzfs-<1 ~ N>.gz" files contain a lot of common stuffs in them! >No, in this example, each file will contain only the incremental changes.> I wonder how will "send -r" do in above situation? How does it choose multiple source and dest snaps? And can "-r" efficient enough to just dump the incremental changes? What is the corresponding receive command for "send -r"? > (receive -r ? I guess? ) >No, receive handles what was sent. -- richard
Richard Elling
2008-Sep-10 22:50 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
correction below... Richard Elling wrote:> Haiou Fu (Kevin) wrote: > >> The closest thing I can find is: >> http://bugs.opensolaris.org/view_bug.do?bug_id=6421958 >> >> > > Look at the man page section on zfs(1m) for -R and -I option explanations. > http://docs.sun.com/app/docs/doc/819-2240/zfs-1m?a=view > > >> But just like it says: " Incremental + >> recursive will be a bit tricker, because how do you specify the multiple >> source and dest snaps? " >> >> Let me clarify this more: >> >> Without "send -r" I need do something like this; >> >> Given a zfs file system "myzfs" in zpool "mypool", it has N snapshots: >> mypool/myzfs >> mypool/myzfs at 1 >> mypool/myzfs at 2 >> .... >> mypool/myzfs at N, >> >> Do following things: >> >> zfs snapshot mypool/myzfs at CURRENT >> zfs send mypool/myzfs at CURRENT | gzip - > /somewhere/myzfs-current.gz >> zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 1 | gzip - > /somewhere/myzfs-1.gz >> zfs send -i mypool/myzfs at CURRENT mypool/myzfs at 2 | gzip - > /somewhere/myzfs-2.gz >> ...... >> zfs send -i mypool/myzfs at CURRENT mypool/myzfs at N | gzip - > /somewhere/myzfs-N.gz >> >> As you can see, above commands are kind of a stupid solution, and it didn''t reach maximum efficiency because those "myzfs-<1 ~ N>.gz" files contain a lot of common stuffs in them! >> >> > > No, in this example, each file will contain only the incremental > changes. > >I read this wrong, because I was looking at the end snapshot, not the start. What you wrote won''t work. If you do something like: zfs send -i mypool at 1 mypool at 2 ... zfs send -i mypool at 2 mypool at 3 ... then there would be no overlap. But I think you will find that zfs send -I is altogether more convenient. -- richard>> I wonder how will "send -r" do in above situation? How does it choose multiple source and dest snaps? And can "-r" efficient enough to just dump the incremental changes? What is the corresponding receive command for "send -r"? >> (receive -r ? I guess? ) >> >> > > No, receive handles what was sent. > -- richard > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Haiou Fu (Kevin)
2008-Sep-11 18:39 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
Excuse me but could you please copy and paste the part of "zfs send -l " ? I couldn''t find it in the link you send me: http://docs.sun.com/app/docs/doc/819-2240/zfs-1m?a=view What release is this "send -l " option available ? -- This message posted from opensolaris.org
Richard Elling
2008-Sep-11 20:03 UTC
[zfs-discuss] Any commands to dump all zfs snapshots like NetApp "snapmirror"
Haiou Fu (Kevin) wrote:> Excuse me but could you please copy and paste the part of "zfs send -l " ? > I couldn''t find it in the link you send me: > > http://docs.sun.com/app/docs/doc/819-2240/zfs-1m?a=view >Not "ell" ''l'', try capital-i ''I''> What release is this "send -l " option available ? >The -I option arrived with the -R option via PSARC 2007/574. It was integrated into NV b77 in October 2007. http://www.opensolaris.org/os/community/arc/caselog/2007/574/onepager/ http://www.opensolaris.org/os/community/on/flag-days/all/ -- richard