- Subject: [jed-users] Re: extended backup (versioning)?
- From: Ulli Horlacher <framstag@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Apr 2014 22:00:15 +0200
On Tue 2013-04-09 (16:23), Ulli Horlacher wrote:
> On Tue 2013-04-09 (08:52), Ulli Horlacher wrote:
>
> > > So "backup.sl" is really close to what VMS was doing.
>
> Based on backups.sl (which was a very good guideline!) I have now written
> versions.sl which does file versioning like my first idea. It rotates
> versions on saving:
>
> file -> file~ -> file~1~ -> file~2~ -> ... -> file~9~ -> (deleted)
>
> Example:
>
> framstag@fex:/sw/share/jedlib-0.99-19/lib: ll versions*
> -rw-r--r-- framstag users 1,530 2013-04-09 16:10:50 versions.sl
> -rw-r--r-- framstag users 1,529 2013-04-09 14:47:48 versions.sl~
> -rw-r--r-- framstag users 1,530 2013-04-09 13:23:43 versions.sl~1~
> -rw-r--r-- framstag users 1,456 2013-04-09 11:50:29 versions.sl~2~
> -rw-r--r-- framstag users 1,456 2013-04-09 11:50:09 versions.sl~3~
My users disliked the versions~ mess in the regular directory, so I moved
them to a .versions/ subdirectory.
Then the vi users requested the same function :-}
So I wrote the helper script vv (visual versioning):
http://fex.rus.uni-stuttgart.de/fstools/vv.html
usage: vv [-l] [file]
vv -r version-number file [new-file]
vv -d version-number[:version-number] file
vv -v version-number file
vv -s file
vv -e file
vv -p
vv -m [-R]
vv -I
options: -l list available versions
-v view version
-r recover file
-d show diff
-s save file to new version
-e edit file with $EDITOR (with versioning)
-p purge orphaned versions (without current file)
-m migrate backup files to version files (-R all recursive)
-I show more information
examples: vv -l project.pl
vv -d 2 project.pl
vv -r 2 project.pl project_2.pl
vv can be integrated into jed if you use vv.sl
http://fex.rus.uni-stuttgart.de/sw/share/jedlib/vv.sl
Now jed makes a backup of every file, even new ones. Example:
framstag@fex:/tmp: jed newfile
(edit and save)
framstag@fex:/tmp: rm newfile
framstag@fex:/tmp: vv newfile
vv: newfile does not exist any more
found ./.versions/newfile - recover it? y
`./.versions/newfile' -> `newfile'
--
Ullrich Horlacher Informationssysteme und Serverbetrieb
Rechenzentrum IZUS/TIK E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart Tel: ++49-711-68565868
Allmandring 30a Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<20130409142328.GD13163@xxxxxxxxxxxxxxxxxxxx>
REF:<20130409142328.GD13163@xxxxxxxxxxxxxxxxxxxx>
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
[2014 date index]
[2014 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]