Ejemplo n.º 1
0
        public void CacheBlobList(string backupsetname, BlobStore cacheblobs)
        {
            string bloblistcachebsname = backupsetname + Core.BlobListCacheSuffix;

            cacheblobs.RemoveAllBackupSetReferences(bloblistcachebsname);
            foreach (KeyValuePair <byte[], BlobLocation> hashblob in GetAllHashesAndBlobLocations(backupsetname))
            {
                cacheblobs.AddBlob(bloblistcachebsname, new HashBlobPair(hashblob.Key, null), hashblob.Value.BlockHashes, true);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="dst"></param>
 /// <param name="blobhash"></param>
 /// <returns>True Blob exists in destination</returns>
 private (BlobLocation bloc, byte[] blob) TransferBlobNoReferences(BlobStore dst, string dstbackupset,
                                                                   byte[] blobhash, BlobLocation blocation)
 {
     if (blocation.BlockHashes == null)
     {
         byte[] blob = LoadBlob(blocation, blobhash);
         return(dst.AddBlob(dstbackupset, new HashBlobPair(blobhash, blob)), blob);
     }
     else
     {
         return(dst.AddMultiBlobReferenceBlob(dstbackupset, blobhash, blocation.BlockHashes), null);
     }
 }