Ejemplo n.º 1
0
 private Dictionary <string, double> Backup(string Source, string Destination)
 {
     try
     {
         return(myCopyer.Backup(Source, Destination));
     }
     catch (Exception Ex)
     {
         throw Ex;
     }
 }
Ejemplo n.º 2
0
        private void Backup(object sender = null, System.Timers.ElapsedEventArgs args = null)
        {
            Copyer myCopyer = new Copyer(ApplicationType.Service);

            serviceLogger.WriteToLogFile("Backup started", Severity.Info);
            foreach (string source in sources)
            {
                try
                {
                    myCopyer.Backup(source, destination);
                }
                catch (Exception Ex)
                {
                    serviceLogger.WriteToLogFile("There was an issue backing up: " + source + "Exception is: " + Ex.Message + "Stack trace is: " + Ex.StackTrace, Severity.Error);
                    serviceLogger.WriteToLogFile("Will attempt to backup at next scheduled time", Severity.Info);
                }
            }
        }