2024-08-23 08:45:43 +02:00
|
|
|
#!/usr/bin/env bb
|
|
|
|
|
2024-08-23 11:39:59 +02:00
|
|
|
(require
|
|
|
|
'[dda.backup.core :as bc]
|
2025-01-13 16:04:12 +01:00
|
|
|
'[dda.backup.config :as cfg]
|
2024-08-23 11:39:59 +02:00
|
|
|
'[dda.backup.restic :as rc])
|
2024-08-23 08:45:43 +02:00
|
|
|
|
2025-01-13 16:04:12 +01:00
|
|
|
(def config (cfg/read-config "/usr/local/bin/config.edn"))
|
2024-08-23 12:10:07 +02:00
|
|
|
|
2024-08-23 11:39:59 +02:00
|
|
|
(defn prepare!
|
|
|
|
[]
|
2025-01-13 16:04:12 +01:00
|
|
|
(bc/create-aws-credentials! (:aws-config config)))
|
2024-08-23 11:39:59 +02:00
|
|
|
|
2024-08-23 08:45:43 +02:00
|
|
|
(defn list-snapshots!
|
|
|
|
[]
|
2025-01-13 16:04:12 +01:00
|
|
|
(rc/list-snapshots! (:file-config config))
|
|
|
|
(rc/list-snapshots! (:db-config config)))
|
2024-08-23 08:45:43 +02:00
|
|
|
|
2024-08-23 11:39:59 +02:00
|
|
|
(prepare!)
|
2024-08-23 08:45:43 +02:00
|
|
|
(list-snapshots!)
|