Ejemplo n.º 1
0
        private static int RunBackup(bool forceFull)
        {
            var configFile = GetConfigFile();
            if (!File.Exists(configFile)) {
                Console.WriteLine("Configuration file [config.xml] does not exist. Run program with /C switch to create one.");
                return ExitCodeFail;
            }

            var p = new BackupEngine(BackupSettings.LoadBackupSettings(configFile));
            return p.PerformBackups(forceFull) ? ExitCodeSuccess : ExitCodeFail;
        }
Ejemplo n.º 2
0
        private static int RunBackup(bool forceFull)
        {
            var configFile = GetConfigFile();

            if (!File.Exists(configFile))
            {
                Console.WriteLine("Configuration file [config.xml] does not exist. Run program with /C switch to create one.");
                return(ExitCodeFail);
            }

            var p = new BackupEngine(BackupSettings.LoadBackupSettings(configFile));

            return(p.PerformBackups(forceFull) ? ExitCodeSuccess : ExitCodeFail);
        }