Subject Re: [firebird-support] ackup restore problem
Author LtColRDSChauhan
*BackUP*:

[STAThread]
static void Main(string[] args)
{
FbConnectionStringBuilder cs = new FbConnectionStringBuilder();

cs.UserID = "SYSDBA";
cs.Password = "masterkey";
cs.Database = "nunit_testdb";

FbBackup backupSvc = new FbBackup();

backupSvc.ConnectionString = cs.ToString();
backupSvc.BackupFiles.Add(new FbBackupFile(@"c:\testdb.gbk", 2048));
backupSvc.Verbose = true;

backupSvc.Options = FbBackupFlags.IgnoreLimbo;

backupSvc.ServiceOutput += new ServiceOutputEventHandler(ServiceOutput);

backupSvc.Execute();
}

static void ServiceOutput(object sender, ServiceOutputEventArgs e)
{
Console.WriteLine(e.Message);
}





*Restore*

[STAThread]
static void Main(string[] args)
{
FbConnectionStringBuilder cs = new FbConnectionStringBuilder();

cs.UserID = "SYSDBA";
cs.Password = "masterkey";
cs.Database = "nunit_testdb";

FbRestore restoreSvc = new FbRestore();

restoreSvc.ConnectionString = cs.ToString();
restoreSvc.BackupFiles.Add(new FbBackupFile(@"c:\testdb.gbk", 2048));
restoreSvc.Verbose = true;
restoreSvc.PageSize = 4096;
restoreSvc.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace;

restoreSvc.ServiceOutput += new
ServiceOutputEventHandler(ServiceOutput);

restoreSvc.Execute();
}

static void ServiceOutput(object sender, ServiceOutputEventArgs e)
{
Console.WriteLine(e.Message);
}


On Thu, Apr 22, 2010 at 11:47 AM, mauleen2001 <mauleen2001@...> wrote:

>
>
> Hi,
>
> I am having a firebird V2.1, Visual studio 2005. I had a backup using
> backup object of firebird but When I tried to restore it gives me a error
> and restore does not done successfully.
>
> My backup and restore procedure as follows.
>
> Backup
>
> Restore
>
> Can any body tell me what I am doing wrong?
>
> Mauleen
>
>
>



--
Regards,
Lt Col (Retd) Rajiv Dular Singh Chauhan
09601704890
0265-2637655
_____________________________


[Non-text portions of this message have been removed]