public static void Backup(string parameters = null) { Backup backup = new Backup(); BlogDemoor blogDemoor = CreateDataManager(parameters); XElement xe = XmlConfig.CurrentConfig.XDocument.Root; backup.TempBackupDirectory = xe.zXPathValue("MongoBackupTmpDirectory"); // TempBackupDirectory backup.BackupDirectory = xe.zXPathValue("MongoBackupDirectory"); // BackupDirectory backup.ZipFilename = xe.zXPathValue("ZipFilename", "BlogDemoor"); backup.Add(dir => blogDemoor.Backup(dir)); backup.DoBackup(); }
private void InitBackup(XElement xe) { _backup = new Backup(); //_backupDirectory = xe.zXPathValue("BackupDirectory"); _backup.TempBackupDirectory = xe.zXPathValue("TempBackupDirectory"); _backup.BackupDirectory = xe.zXPathValue("BackupDirectory"); _backup.ZipFilename = xe.zXPathValue("ZipFilename", "BackupAutomate"); //_backup.Add(dir => MongoBackup.Backup(_mongoDownloadAutomateManager.GetCollection(), dir)); //_downloadManager.InitBackup(_backup); //foreach (ServerManager server in _servers.Values) //{ // _backup.Add(dir => server.Backup(dir)); //} }
public void InitBackup(Backup backup) { backup.Add(dir => MongoBackup.Backup(_mongoDownloadedFileManager.GetCollection(), dir)); backup.Add(dir => MongoBackup.Backup(_mongoQueueDownloadFileManager.GetCollection(), dir)); backup.Add(dir => MongoBackup.Backup(_mongoCurrentDownloadFileManager.GetCollection(), dir)); }