Solved

Unable to programmatically restore Firebird d/b

Posted on 2011-03-05
7
1,079 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Webinar: MariaDB® Server 10.2: The Complete Guide

Join Percona’s Chief Evangelist, Colin Charles as he presents MariaDB Server 10.2: The Complete Guide on Tuesday, June 27, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

691 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