Unable to programmatically restore Firebird d/b

I have the code below... it does NOT work!  However, if I take the same string and put it in a command prompt, works like a champ... the "firebirdinstallationpath" is correct (I verified it).

Why won't this work?
string debugString = " -REP -user sysdba -pass masterkey \"" + backupFilename + "\" " + dbPath;
            Process.Start(firebirdInstallationPath + "gbak.exe", debugString);

Open in new window

rmmarshAsked:
Who is Participating?
 
Nick UpsonConnect With a Mentor Principal Operations EngineerCommented:
you should never use "replace", always restore to a different location and move the resulting file if it restores ok, it is perfectly possible to take a backup that cannot restore, using replace you have lost your good database as well then.

that said, check file permissions, gbak at the operatin gsystem level is run by the user but the database is run by the firebird user
0
 
rmmarshAuthor Commented:
Hi Nick... glad to hear from you... I'll give it a try and get back to you...

0
 
sjklein42Commented:
Just in case, get rid of the leading blank character in debug string.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
rmmarshAuthor Commented:
That worked like a champ!  I don't understand why, tho'... can you enlighten me?
0
 
sjklein42Commented:
Hi.  Which one worked like a champ?
0
 
rmmarshAuthor Commented:
Nicks...
0
 
rmmarshAuthor Commented:
Thanks again...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.