Solved

Unable to programmatically restore Firebird d/b

Posted on 2011-03-05
7
1,062 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

786 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