venerdì 23 febbraio 2007

Subversion not only for source code

I have lot of important documents, on different computers, in different locations, for different purposes.
I wanted to keep all this data as safe as I can, so I’ve set up a repository on our Subversion server for this purpose.
With TortoiseSVN I have a very nice user interface that permits me to easily keep all this documents both safe
(out server has an automatic backup system) and versioned (wow! Once you get used to it, you can’t do without!).
But subversion can be very useful even on a single machine: install subversion and TortoiseSVN, and create a repository:
svnadmin create file:///c:/svn/Documents
Now, you can add to the repository all the documents you want to keep safe and versioned (eventually organized into directories):
using explorer, open your Document folder, right-click on the document you want to add, go on the TortoiseSVN menu,
and select “add” (or “Aggiungi”, if you have the Italian language pack ;-) ).
Well, that’s all! Whenever you modify the document, its icon will change, and you’ll be able to commit it to the repository,
and do the same things you usually do on your versioning system when you work with source code.
To do a backup copy of the repository, you can use svnadmin with the dump or hotcopy commands
(I’m using both of them on our server, to keep a mirror with hotcopy and a full backup on DVD with the dump).
It’s really easy and fast to set up, even easier to use, useful… and open source! Try it!

Get subversion
Get TortoiseSVN

Here also a small Backup.bat utility I use to backup my repos:

@echo off
cd c:\svn
for /D %%i in (*) do svnadmin dump c:\svn\%%i > c:\Backup_svn\%%i_dump
cd C:\Backup_svn
del *.old.7z
ren *.7z *.old.7z
for %%f in (*_dump) do C:\Programmi\7-Zip\7z a %%f.7z %%f
for %%f in (*_dump) do del %%f
cd ..


For this script you'll need 7z as well.

4 commenti:

Unknown ha detto...

we t-boy ... just a question, why r u using subversion instead of cvs ? i admit my ignorance in this field, i just can see that the latter is widelywidelywidely used over the world (sourceforge p.e., linux' kernels, and so on ...)
it also has winborg interfaces and all of that stuffs.
does subversion permit concurrent check-outs ? let me see the light plz ... :P

Miki ha detto...

Well, Subversion is meant to be a better CVS, so I guess it's bettah!
And it's also possible to get svn repositories from source forge (and even convert old cvs repos to svn)... that's all!
Btw, are you back in euroland?!?! Can't wait to see ya again!

Unknown ha detto...

urgh, i'm getting old with these info-stuff ... suerte que usted existe, t-boy !
yess i'm coming back REALLY soon, like this monday ... and, as you know, i've something amazing to let you meet ...
te voy a buscar en msn en un par de dias !

Anonimo ha detto...

Well written article.