From fef951f0b436e000341835de38f815b22d6e15e9 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 18 Aug 2021 21:50:15 +0200 Subject: [PATCH] Add todos --- main.go | 26 ++++++++++++++++++++++++++ store.go | 3 +++ 2 files changed, 29 insertions(+) diff --git a/main.go b/main.go index da29a2c..25a227d 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,30 @@ package main +import ( + "log" +) + func main() { + c, err := getClient() + if err != nil { + log.Fatalf("Could not create client: %s", err) + } + + updateFullBackupPath() + + containers, err := getContainers(c) + if err != nil { + log.Fatalf("Could not get containers: %s", err) + } + + storeContainers(c, containers) + + err = dumpAllDatabases() + if err != nil { + // TODO: Only log errors while dumping dbs + log.Fatalf("Could not dump databases: %s", err) + } + + // TODO: Cron + // TODO: Cleanup old } diff --git a/store.go b/store.go index d0b83c2..8c26692 100644 --- a/store.go +++ b/store.go @@ -40,4 +40,7 @@ func storeContainers(c *client.Client, containers []types.Container) { store[container.ID] = dumper } + + // TODO: remove old containers + }