File Version Explorer

If you're using OpenSolaris you should certainly have Time Slider enabled, at least on your home directory. OpenSolaris 2009.06 brings some enhancements to Time Slider, one of them being the ability to explore a file's versions:

From the File Version Explorer you can then compare older versions with the current. You'll see the following hint, which I'll get to in a minute:

It's a standard text diff like you would see from the command line. Now, back to that hint, let's install the SUNWmeld package:

bleonard@opensolaris:~$ pfexec pkg install SUNWmeld
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1     119/119     0.79/0.79 

PHASE                                        ACTIONS
Install Phase                                205/205 
PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                                1/1

Then try running the compare again:

Note, Meld is more than just a viewer. You can merge changes or edit and save the current file. Meld also recognizes and highlights your changes in real time.



Comments:

Definitely worth installing meld...this is fantastic. it would be great if we could expand this out to work with other types of files such as docs, spreadsheets, images etc.

This has to be one of the most useful desktop enhancements ive seen on the desktop in a very very long time

Posted by Che Kristo on June 17, 2009 at 01:23 AM GMT #

This looks great.

It'd be nice if the title bar could say the snapshot name instead of [.zfs], which is the container directory.

Posted by Mark J Musante on June 17, 2009 at 05:27 AM GMT #

Nice! Is there also command line interface for this feature?

Posted by Gaëtan Lehmann on June 17, 2009 at 01:05 PM GMT #

There is no specific time-slider or version explorer CLI currently. You might consider filing an enhancement request at http://defect.opensolaris.org if you want to see one.

Of course, if you know how ZFS snapshots are stored on disk (in the .zfs/snapshot directory at the root of the containing file system), you don't need much more than the 'ls' and 'diff'' commands to achieve the same results. But there's certainly some scope to provide a more specific CLI, if enough people want it.

Posted by Calum on June 20, 2009 at 03:00 PM GMT #

The main feature of a CLI would be to display the different versions available, without the need to search in the snapshots - like it's done in the GUI.

Something like:

$ ts changes main.c
1. 12/06/09 22h08s31 1.4 KB (1390 bytes)
2. 10/06/09 16h58s32 1.2 KB (1181 bytes)
3. 09/06/09 16h31s04 1.1 KB (1167 bytes)
4. 08/06/09 20h49s26 510 B (510 bytes)

then it would be nice to have a few more subcommands, like

$ ts diff snapshot [base snapshot] file

where "snapshot" and "base snapshot" can be either a snapshot number given in the list above or a date. Some options may be nice, like the diff's "-u" or a gui mode.

$ ts restore [snapshot] file

and probably many others.
I'll try to file an enhancement request in the next days.

Posted by Gaëtan Lehmann on June 23, 2009 at 01:44 PM GMT #

A question, it's possible to run the File Version Explorer on a zfs other machine ?

Posted by Roumano on February 02, 2010 at 02:02 PM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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