General
cancel
Showing results for 
Search instead for 
Did you mean: 

frecover without interactive mode with bad backup

SOLVED
Go to solution
Olivier DECORSE_1
Occasional Contributor

frecover without interactive mode with bad backup

Hello,
i'm trying to test an archive file made with fbackup.
My command is :
frecover -r -N -f file.bkp
My problem is : when the archive is bad, frecover ask for "salvage" this volume, or "try with a different one". This is the interactive mode i don't want in my script. I just need to known if the backup is good, or bad !!
stdout is :
--------------------------------------
frecover -r -N -f 149.bkp
frecover(5418): not an fbackup volume; unable to read volume header
frecover(5412): Do you wish to try to salvage this volume? [yes no] no
frecover(5411): Do you wish to try a different volume? [yes no] no
frecover(5414): abort selected
--------------------------------------

i try : "echo "no\nno\n" | frecover ... but it doesn't works better,
or -S option to skip bad blocks, but without any success!
Thank's a lot in advance !
Olivier.
3 REPLIES
Dietmar Konermann
Honored Contributor
Solution

Re: frecover without interactive mode with bad backup

Wow, that's really complicated... frecover open()s directly its controlling terminal, if possible.

You could use the expect toolkit. Or run it from a cron/at job... when frecover fails you could examine the stdout/stderr.

Really bad. There is simply a "-n" option missing (answer "no" to all questions... just like "-y").

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Olivier DECORSE_1
Occasional Contributor

Re: frecover without interactive mode with bad backup

Thank's Dietmar to your response.
I think the expect toolkit is a little complicate, and using cron/job is not possible.
May be the next version of frecover will have the '-n' otion ...

Before this version is available, i this i will try to convert all of my scripts with the 'tar' command !!!

Olivier.
Dietmar Konermann
Honored Contributor

Re: frecover without interactive mode with bad backup

I submitted enhancement request JAGae46974 to address this issue.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)