示例#1
0
文件: WebData.cs 项目: labeuze/source
        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();
        }
示例#2
0
        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));
            //}
        }
示例#3
0
 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));
 }