private void DevEndpointToFileBackup(string sourceConStr, string filename, int operationCount) { OnOperationChange(1, operationCount, "Backing up development storage"); // Perform local backup string tempFilename = Path.GetFileNameWithoutExtension(filename) + ".tsbak"; var source = new TableStorageDataSource(BackupDirection.Source, sourceConStr); var dest = new FileDataSource(BackupDirection.Destination, sourceConStr, tempContainerName, tempFilename); this.backup.Start(source, dest, OnProgress); // Download the blob to file DownloadBlob(sourceConStr, tempContainerName, tempFilename, filename, true, false); }
private void FileToDevEndpointBackup(string filename, string sourceConStr, int operationNo, int operationCount) { OnOperationChange(operationNo, operationCount, "Restoring to Development Storage"); // Upload file to blob string tempFilename = this.GetTempFilename(); UploadBlob(sourceConStr, tempContainerName, tempFilename, filename, false, false); // Perform local backup var source = new FileDataSource(BackupDirection.Source, sourceConStr, tempContainerName, tempFilename); var dest = new TableStorageDataSource(BackupDirection.Destination, sourceConStr); this.backup.Start(source, dest, OnProgress); }