nautilus meets zfs snapshots

After ZFS saved the day earlier in the week I wanted to get to the stage where the email to me was not required, at least if the user is on the a Solaris system.

So I've updated my zfs_versions script which you will recall prints out all the versions of a file that exist on a zfs file system. The new script has an additional flag so that it can better support a nautilus script that allows you to highlight a file, then it will list all the versions of that file, not all the snapshots, but all the distinct versions of the file.




Choose the show_versions script. In a fit of recursion you can see the example is for the show_versions script




Finally select the version you want:




It will then open a nautilus window in the directory that contains the version of the file. What is more it even works over NFS.

You need 2 scripts:

  1. zfs_versions, this must be in your path without the .tcl postfix.

  2. show_versions. This has to be stored in the .gnome2/nautilus-scripts directory in your home directory.

Make both scripts mode 755 and then run “nautilus -q”.

Things to note.

It considers the file to be the path to the file. So if you rename a file you will not see revisions with the old name. It would be really cool if there was a way to get all the versions of a file without resorting to doing an exhaustive search of the file system, but there is not.

I don't know how to make the available to all users without messing in each ~/.gnome2 directory. If you do then add a comment.

Hat tip to Sandip for alerting me to nautilus scripts.

Comments:

Nice one Chris. I did some other Nautilus integration over at http://blogs.sun.com/timf/entry/zfs_on_your_desktop
- allowing you to view the current directory in any of the known snapshots, take new snapshots, list snapshots and destroy them.

Posted by Tim Foster on September 06, 2007 at 07:39 AM BST #

Nice, very nice.

Now all you need to do is integrate a very fancy Compiz Fusion super-GUI and we'll have Apple on the run. Or not.

Need to get this script shipped as default with new Nevada builds.

Posted by Lewis on September 06, 2007 at 10:03 AM BST #

A quick Google suggests that you want:

/usr/share/nautilus-scripts

but I've not tried it.

cheers,
c.

Posted by Calum Mackay on September 21, 2007 at 04:03 PM BST #

/usr/share/nautilus-scripts does not seem to be it.

I'm now trying to think of a way to help users find files they have deleted, since clearly they can't select them. However and exhaustive search takes a very very long time when you have thousands of snapshots.

Posted by Chris Gerhard on September 22, 2007 at 06:24 AM BST #

Post a Comment:
Comments are closed for this entry.
About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today