public void TakeDatabaseBackup(string name) { var backupFile = backupFileProvider.GetBackupFileFromBackupName(name); var dbFile = dbFileProvider.GetDatabaseFile(); snapshotFileService.Copy(dbFile, backupFile); }
public Snapshot TakeDatabaseSnapshot() { var dataFile = dbFileProvider.GetDatabaseFile(); logger.Debug($"{nameof(TakeDatabaseSnapshot)} getting the file for a new snapshot, based on data file '{dataFile.FullName}'"); var snapshotFile = fileService.GetFileForNewSnapshot(dataFile); logger.Debug($"{nameof(TakeDatabaseSnapshot)} got new snapshot file: '{snapshotFile.FullName}'"); fileService.Copy(dataFile, snapshotFile); return(GetSnapshot(snapshotFile)); }