Solved

Unable to programmatically restore Firebird d/b

Posted on 2011-03-05
7
1,072 Views
Last Modified: 2013-12-09
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

0
Comment
Question by:rmmarsh
  • 4
  • 2
7 Comments
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 35044760
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
 

Author Comment

by:rmmarsh
ID: 35044766
Hi Nick... glad to hear from you... I'll give it a try and get back to you...

0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35044769
Just in case, get rid of the leading blank character in debug string.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:rmmarsh
ID: 35044794
That worked like a champ!  I don't understand why, tho'... can you enlighten me?
0
 
LVL 16

Expert Comment

by:sjklein42
ID: 35044860
Hi.  Which one worked like a champ?
0
 

Author Comment

by:rmmarsh
ID: 35044864
Nicks...
0
 

Author Closing Comment

by:rmmarsh
ID: 35044869
Thanks again...
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question