示例#1
0
 public BackupStatusReport GetBackupStatus(Guid siteId)
 {
     try
     {
         BitplateBackupServiceReference.BackupServiceClient backupClient = new BitplateBackupServiceReference.BackupServiceClient();
         return(JSONSerializer.Deserialize <BackupStatusReport>(backupClient.GetBackupStatus(siteId), true));
     }
     catch (Exception ex)
     {
         BackupStatusReport exceptioReport = new BackupStatusReport();
         exceptioReport.BackupCompleted = true;
         exceptioReport.StatusMessage   = "Kan BitBackupService niet vinden.\r\n" + ex.ToString();
         return(exceptioReport);
     }
 }
示例#2
0
 public string RestoreBackup(string backupName)
 {
     BitplateBackupServiceReference.BackupServiceClient backupClient = new BitplateBackupServiceReference.BackupServiceClient();
     backupClient.RestoreBackup(SessionObject.CurrentSite.ID, SessionObject.CurrentSite.CurrentWorkingEnvironment.Path, backupName, System.Configuration.ConfigurationManager.ConnectionStrings["cmsdb"].ConnectionString);
     return(ConfigurationManager.AppSettings["LicenseHost"] + "BackupRestore/restore.aspx?siteId=" + SessionObject.CurrentSite.ID.ToString() + "&returnUrl=" + SessionObject.CurrentSite.CurrentWorkingEnvironment.DomainName);
 }
示例#3
0
 public BackupStatusReport GetBackupStatus()
 {
     BitplateBackupServiceReference.BackupServiceClient backupClient = new BitplateBackupServiceReference.BackupServiceClient();
     return(JSONSerializer.Deserialize <BackupStatusReport>(backupClient.GetBackupStatus(SessionObject.CurrentSite.ID), true));
 }
示例#4
0
 public void CreateBackup()
 {
     BitplateBackupServiceReference.BackupServiceClient backupClient = new BitplateBackupServiceReference.BackupServiceClient();
     bool test = backupClient.MakeBackup(SessionObject.CurrentSite.ID, SessionObject.CurrentSite.CurrentWorkingEnvironment.Path, System.Configuration.ConfigurationManager.ConnectionStrings["cmsdb"].ConnectionString);
 }