I have about 300GB data on local storage that gets synced to azure blob storage. Lately if any new files are posted it takes days before those files are uploaded to the blob. Is there a way i can do only deltas? Files only the local storage don't change
often, but when new files are posted i want them to be uploaded soon.
I am using MS syncframework 2.0. Here is my code:
// Setup Store and Provider
string accountName = ConfigurationManager.AppSettings.Get("AccountName");
string accountKey = ConfigurationManager.AppSettings.Get("AccountSharedKey");
string storageURL = ConfigurationManager.AppSettings.Get("AccountStorageURL");
CloudStorageAccount storageAccount = new CloudStorageAccount(new StorageCredentialsAccountAndKey(accountName, accountKey), false);
AzureBlobStore blobStore = new AzureBlobStore(_containerName, storageAccount);
Info("Successfully created/attached to container " + _containerName + ".");
AzureBlobSyncProvider azureProvider = new AzureBlobSyncProvider(_containerName, blobStore);
azureProvider.ApplyingChange += new EventHandler<ApplyingBlobEventArgs>(UploadingFile);
FileSyncProvider fileSyncProvider = null;
try
{
fileSyncProvider = new FileSyncProvider(_localPathName);
}
catch (ArgumentException)
{
fileSyncProvider = new FileSyncProvider(Guid.NewGuid(), _localPathName);
}
fileSyncProvider.ApplyingChange += new EventHandler<ApplyingChangeEventArgs>(DownloadingFile);
try
{
SyncOrchestrator orchestrator = new SyncOrchestrator();
orchestrator.LocalProvider = fileSyncProvider;
orchestrator.RemoteProvider = azureProvider;
orchestrator.Synchronize();
}
finally
{
fileSyncProvider.Dispose();
}