Ejemplo n.º 1
0
        public void DoBackup()
        {
            SQLiteClass sql = new SQLiteClass();

            Backup bkpDBFull = new Backup();

            bkpDBFull.Action   = BackupActionType.Database;
            bkpDBFull.Database = dtb.Name;

            bkpDBFull.Devices.AddDevice(sql.GetBackupLocation() + "\\" + DateTime.Now.ToString("ddMMyyyy hhmmss") + ".bak", DeviceType.File);
            bkpDBFull.BackupSetName        = "Duckpond Suite Database Backup " + DateTime.Now;
            bkpDBFull.BackupSetDescription = "Duckpond Suite Database - Full Backup";

            bkpDBFull.ExpirationDate = DateTime.Today.AddDays(28);

            bkpDBFull.Initialize = false;

            try
            {
                bkpDBFull.SqlBackup(srv);
            }
            catch
            {
                throw new FailedOperationException();
            }
        }
Ejemplo n.º 2
0
 public Backup()
 {
     sql = new SQLiteClass();
     InitializeComponent();
     LblLocation.Content = sql.GetBackupLocation();
 }