Solved

Unable to programmatically restore Firebird d/b

Posted on 2011-03-05
7
1,057 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now