I'm trying to use following code to backup a database located on a remote server on which I do NOT have write permission :
FbBackup backupSvc = new FbBackup();
backupSvc.ConnectionString = ConnectionStr; // on remote server
backupSvc.BackupFiles.Add(new FbBackupFile(destFile)); // local file
backupSvc.Verbose = true;
backupSvc.Options = FbBackupFlags.IgnoreLimbo;
backupSvc.ServiceOutput += ServiceOutput;
backupSvc.Execute();
This works just perfectly fine if the DB is on localhost
or if I can write to the server folder. The problem is when I need to save the file to the local machine (since I do NOT have permissions on the server). Weirdly enough, the service output shows the usual output - just that at the end, the local file is NOT created...!
I read here about using gbak
, but I ran into many other problems using that. I am pretty sure there is a missing parameter or any other weird trick I'm missing...