Re: Retrieve file history inside dar catalogue

Denis Corbin <[email protected]> Fri, 08 Oct 2004 12:46:25 +0200
Newsgroups gmane.comp.sysutils.backup.dar.libdar
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thierry Pierron wrote:
| Hi all !

Hello Thierry,

|
| I found dar some weeks ago, and I found it quite useful. I used to
play with
| afbackup, but I'll be quite happy to replace it by dar.
|
| Okay, but I just would like to have a little utility that can show me
| contents of dar catalogue created by dar_manager, with history of each
| files archived.

dar_manager can give you the information of a given file with the -f option.

|
| Is it possible with libdar to read and retrieve file information (at least
| size, perm, date, and filename of course) and each version ?

dar_manager database are not in libdar but in dar_manager own code. It
has not been yet moved to libdar unlike most of the dar code.

|
| If not is it possible to read directly (without help of libdar) the .dmd
| file ? I don't see any description of that file in the archive of dar.

dar_manager is the only command that is aware of dmd files (dar_manager
database).

|
| I try "dar_manager -u0 -B <arch>.dmd", but it shows me only last filename
| information, with no additional information.

a dar_manager database does not contain all information about a given
inode, just the name, the dates and the archive where is has been taken
from.

|
| Well, actually I often got requests of users who have accidentaly damaged
| one of their precious file. They usually notice that mistake just a
few days
| later. With afbackup I have to do ugly hack to restore the correct
"version",
| and I'm quite fed up with this. That's why if I can get history in a
sort of
| tree view, it will greatly simplify my life.

I think dar_manager can save you a lot of time. Suppose a user named joe
tells you he has, by mistake, destroyed his ".login" file. Assuming as a
system administrator you regulary make backups of the system with dar
and each time update a dar_manager database named "system" you can have
an history of the requested file thanks to the following command :

	dar_manager -B system -f home/joe/.login

which will produce something like this :

Archive number |  Data      |  EA
- ---------------+------------+------------
~        1       Sat Dec  6 11:26:37 2003
~        9       Sat Dec  6 11:26:37 2003

joe's .login file has been saved in archive 1 and 9 and the modification
dates is given in second column. No EA have been saved (else the
corresponding date would be listed in thrid column).

you can then use dar on the 9th or the 1st backup to restore the
requested file:

	dar -x <archvie n°1> -R / -v home/joe/.login

if you just want to get the last version you can use dar_manager :

~        dar_manager -B system -r home/joe/.login

assuming you have given the database the following option to pass
to dar :
	dar_manager -B system -o -R / -v

which will then make the same thing as:

	dar -x <archive n°9> -R / -v home/joe/.login

The advantage of using dar_manager for retreiving the last version of a
given set of file, is that you have only one command to type that
receive the list of files to restore. Then dar_manager will call dar
several time if necessary with the different archive where are located
the last versions of requested files.

|
| Maybe KDar can do this, but it was rather painful to use (Moreover I'm not
| a KDE user)
|
| BTW, a little advice about DAR API. Why do you bother writing library for
| such tool ? It is much more simple to provide pipe-driven command,
just like
| aspell/ispell or "gdb --interpreter=mi". You don't have to painfully
provide
| bindings for every languages.

In the last news, there will be bindings only for C++. As you said it is
painful to make bindings to other languages, dar and libdar are written
in C++

Now why a libdar and a API ? To have a GUI first. As I don't find much
fun devlopping a GUI, this was for me the most simple way to let other
do it, having a clear interface between the different development teams.

Now, why a GUI ? Because end-users too want to use dar. Many feel more
confortable with graphical user interface than command line interface.
having a GUI does not remove anything the the dar command line applications.

| Okay, maybe that "trick" does not work very
| well on Windows

the graphical application that generates the command-line was in project
too. But seems to have been dropped, I cannot have any news from the
author.

| Well, it's just an idea, in case of one day you want to
| provide another bindinds. Just think of it, because it has many advantages
| over dynamic/static library.

for windows, Dar/libdar rely on Cygwin. It seems to work properly so far
(still have a pending bug that I am unable to reproduce).

|
| Regards,
| --
| Thierry Pierron
|

Cheers,
Denis.

|
|
|
| -------------------------------------------------------
| This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
| Use IT products in your business? Tell us what you think of them. Give us
| Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
| http://productguide.itmanagersjournal.com/guidepromo.tmpl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBZnAApC5CI8gYGlIRAptsAJ0Q5fKYljThamyv7tDgTXxywR3cRACgnJfO
AI4QG9/dS9VR4VZJzleWBTo=
=TyDy
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl