public void BackupRestore_B_Restore02StreamingTest()
		{
			if (GetServerVersion() < new Version("2.5.0.0"))
			{
				Assert.Inconclusive("Not supported on this version.");
				return;
			}

			FbStreamingRestore restoreSvc = new FbStreamingRestore();

			using (var fs = File.OpenRead(GetBackupRestoreFullPath()))
			{
				restoreSvc.ConnectionString = BuildServicesConnectionString();
				restoreSvc.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace;
				restoreSvc.PageSize = 4096;
				restoreSvc.Verbose = true;
				restoreSvc.InputStream = fs;

				restoreSvc.ServiceOutput += ServiceOutput;

				restoreSvc.Execute();
			}

			// some validation
		}
Beispiel #2
0
		public void BackupRestore_B_Restore02StreamingTest()
		{
			FbStreamingRestore restoreSvc = new FbStreamingRestore();

			using (var fs = File.OpenRead(GetBackupRestoreFullPath()))
			{
				restoreSvc.ConnectionString = this.BuildServicesConnectionString();
				restoreSvc.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace;
				restoreSvc.PageSize = 4096;
				restoreSvc.Verbose = true;
				restoreSvc.InputStream = fs;

				restoreSvc.ServiceOutput += ServiceOutput;

				restoreSvc.Execute();
			}

			// some validation
		}
		public void StreamingBackupRestoreTest_RestorePart(MemoryStream buffer)
		{
			FbStreamingRestore restoreSvc = new FbStreamingRestore();

			restoreSvc.ConnectionString = BuildServicesConnectionString(FbServerType);
			restoreSvc.Options = FbRestoreFlags.Create | FbRestoreFlags.Replace;
			restoreSvc.PageSize = 4096;
			restoreSvc.Verbose = true;
			restoreSvc.InputStream = buffer;

			restoreSvc.ServiceOutput += ServiceOutput;

			restoreSvc.Execute();
		}