Exemplo n.º 1
0
        public async Task PrintBackups(TextWriter outStream)
        {
            var backups = await dataBase.GetBackups();

            var servers = (await dataBase.GetServers()).ToList();

            foreach (var backup in backups)
            {
                var size = await dataBase.BackupSize(backup.Id);

                await outStream.WriteLineAsync($"{backup.Id.ToString()} - {backup.StartDate.ToLocalTime()} - {servers.First(server => server.Id == backup.Server).Name} - {size} bytes");
            }
        }
Exemplo n.º 2
0
 public async Task <IActionResult> ByServer(Guid serverId)
 {
     return(Ok(await metaDB.GetBackups(serverId)));
 }
Exemplo n.º 3
0
 public async Task List()
 {
     await PrintBackups(await metaDB.GetBackups());
 }