Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread 2.07b1 and Restoring remote stores broken?
Tue, Jan 31 2012 2:31 PMPermanent Link

Lance Rasmussen

Jazzie Software

Avatar

Team Elevate Team Elevate

Did something change in backup/restoring remote stores?

Worked previously but now I can't restore.   Previously was one of later 2.06 releases under XE and now this is under XE2 and 2.07b1.

Using client/server.  Normally server is on machine that the app with this code is on, but it could be remote.

I do a fileexist test on the OpenDialog.Filename earlier.


ConfigurationQuery.SQL.Text := 'SELECT * FROM Stores WHERE Name=''MYBACKUPS''';
ConfigurationQuery.ExecSQL;
if ConfigurationQuery.RecordCount > 0 then begin
 ConfigurationQuery.Close;
 ConfigurationQuery.SQL.Text := 'ALTER STORE "MYBACKUPS" AS LOCAL PATH ''' +
                                                 ExtractFilePath(OpenDialog.FileName) + '''';
 ConfigurationQuery.ExecSQL;
end
else begin
 ConfigurationQuery.Close;
 ConfigurationQuery.SQL.Text := 'CREATE STORE "MYBACKUPS" AS LOCAL PATH ''' +
                                                ExtractFilePath(OpenDialog.FileName) + '''';
 ConfigurationQuery.ExecSQL;
end;

ConfigurationQuery.Close;
ConfigurationQuery.SQL.Text := 'RESTORE DATABASE "' + DATABASE_NAME + '" FROM "' +
                                               copy(ExtractFileName(OpenDialog.FileName), 0,
                                               length(ExtractFileName(OpenDialog.FileName)) -
                                               length(ExtractFileExt(ExtractFileName(OpenDialog.FileName)))) + '"' +
                   ' IN STORE "MBDIIBACKUPS" INCLUDE CATALOG ';

ConfigurationQuery.ExecSQL;
ConfigurationQuery.Close;


Lance
Tue, Jan 31 2012 2:53 PMPermanent Link

Lance Rasmussen

Jazzie Software

Avatar

Team Elevate Team Elevate

Sorry.

After careful review, I found a critical iD10T error found between the keyboard and chair.

I use a different extension on the backup files.  I only have a couple slight modifications to the server source code. When I migrated to XE2, I simply reapplied the changes to the XE2 server source instead of migrating my server.  Forgot to change the engine backup extension.

So....  Really this was a test and user contributed FAQ actually.   Wink

Lance
Image