Amanda-Users

Recovering files

2006-04-20 19:30:26
Subject: Recovering files
From: "Stefano Manzi" <milanwinner AT email DOT it>
To: <amanda-users AT amanda DOT org>
Date: Fri, 21 Apr 2006 01:25:39 +0200
So, here I am with another question.
But this one is a bit more complicated, at least... for me that I've never programmed seriously in the years I've been using the computer.
I have to create an user interface which allows inexperienced users of the Linux commands to launch a program, which might be called, e.g., arui (amanda restore user interface), select a path containing the backup sets (obviously, from a menu list!), choose a date (always from a menu) and according to the previous mentioned information, amrecover would be executed with the two parameters. At this point, the list of files present in the directory should be shown as a checklist menu where the user can decide which file(s) to restore (fro example, after a wrong delete operation).
Well, after having explained my aim, I inform you that what I've reached in a month of work is only the following that my script is able to do:
a. asking, with an echo & read statement, to select an arbitrary path;
b. printing the selected directory;
c. showing a menu (created with dialog --calendar) from which choose a date, that is redirected with the 2> parameter to a temporary file.
Also, the path is written to a file called input. So, amrecover reads as input parameters the setdisk and setdate commands from the two input files, and correctly sets the working date. But for what concerns the directory... it says something like:
you must configure host before...
ops, I can't remember well the exact waring entirely!
And from the Linux machine it's a bit difficult to send mail using Mutt, I don't know why!
Anyway: apart from the little detail of setting the disk (that is always a little problem to solve) the bigger thing to complete is how to let amrecover understand the output, for example, of dialog --fselect or ls -1 command.
In fact, amrecover can't read as input the dialog command, nor is the -1 switch of ls valid for it.
And I don't have any kind of idea on how to give amrecover the list of files as a menu with checkboxes, so that when a user selects the file(s) and clicks the OK button, the file(s) is/are added to the list and extracted (add and extract amrecover's command, ndr).
 
And, to finish this speech, do you think that bash would be efficient? By myself, I do think so, because I don't know other language beside to: bash, pascal and basic for DOS and stop!
 
I tell you, once more time, thank you very much for supporting me!
 
Have a good time
 
Stefano
 
 
 
 
 
 
<Prev in Thread] Current Thread [Next in Thread>