Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new restore instance
 /// </summary>
 /// <param name="archive">
 /// The SkyFloe archive for the restore
 /// </param>
 /// <param name="session">
 /// The restore session being processed
 /// </param>
 public GlacierRestore(GlacierArchive archive, Restore.Session session)
 {
     this.archive = archive;
      if (session.State == SkyFloe.Restore.SessionState.Pending)
     ScheduleRetrievals(session);
      this.downloader = new GlacierDownloader(
     this.archive.Glacier,
     this.archive.Vault
      );
      this.retrievalLimiter = new IO.RateLimiter(
     Math.Min(session.RateLimit, MaxRetrievalRate)
      );
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Connects to an existing store archive
 /// </summary>
 /// <param name="name">
 /// The name of the archive to open
 /// </param>
 /// <returns>
 /// The connected archive implementation
 /// </returns>
 public IArchive OpenArchive(String name)
 {
     var archive = new GlacierArchive(
     this.s3,
     this.glacier,
     GetVaultName(name),
     this.Bucket,
     name
      );
      archive.Open();
      return archive;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new store archive
 /// </summary>
 /// <param name="name">
 /// The name of the archive to create
 /// </param>
 /// <param name="header">
 /// The backup header for the archive index
 /// </param>
 /// <returns>
 /// The connected archive implementation
 /// </returns>
 public IArchive CreateArchive(String name, Backup.Header header)
 {
     var archive = new GlacierArchive(
     this.s3,
     this.glacier,
     GetVaultName(name),
     this.Bucket,
     name
      );
      archive.Create(header);
      return archive;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new backup instance
 /// </summary>
 /// <param name="archive">
 /// The SkyFloe archive for the backup
 /// </param>
 /// <param name="session">
 /// The backup session being processed
 /// </param>
 public GlacierBackup(GlacierArchive archive, Backup.Session session)
 {
     this.archive = archive;
 }