updates for doc / test

This commit is contained in:
Michael Jerger 2025-01-13 16:02:12 +01:00
parent 020d9559e1
commit bd0c808644
3 changed files with 8 additions and 7 deletions
doc
infrastructure/backup/test/resources

View file

@ -4,7 +4,7 @@
* we use restic to produce small & encrypted backups
* backup is scheduled at `schedule: "10 23 * * *"`
* Cloud stores files on `/var/jira`, these files are backuped. If you create a jira xml backup located in /var/jira this file will also be backed up.
* Cloud stores files on `/var/cloud`, these files are backuped. If you create a jira xml backup located in /var/jira this file will also be backed up.
* postgres db is backed up as pgdump
## Manual backup

View file

@ -1,3 +1,4 @@
{:deps {org.clojure/spec.alpha {:mvn/version "0.4.233"}
orchestra/orchestra {:mvn/version "2021.01.01-1"}
aero/aero {:mvn/version "1.1.6"}
org.domaindrivenarchitecture/dda-backup {:local/root "/usr/local/lib/dda-backup"}}}

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bb
(require '[babashka.tasks :as tasks]
'[dda.backup.core :as bc]
'[dda.backup.config :as cfg]
'[dda.backup.config :as cfg]
'[dda.backup.restic :as rc]
'[dda.backup.postgresql :as pg]
'[dda.backup.backup :as bak]
@ -9,7 +9,7 @@
(def config (cfg/read-config "/usr/local/bin/config.edn"))
(def file-pw-change-config (merge (:file-config config)
(def file-pw-change-config (merge (:file-config config)
{:new-password-file (bc/env-or-file "RESTIC_NEW_PASSWORD_FILE")}))
(defn prepare!
@ -21,7 +21,7 @@
(defn restic-repo-init!
[]
(rc/init! (:file-config config))
(rc/init! (merge (:db-role-config config)
(rc/init! (merge (:db-role-config config)
(:dry-run config)))
(rc/init! (merge (:db-config config)
(:dry-run config))))
@ -29,7 +29,7 @@
(defn restic-backup!
[]
(bak/backup-file! (:file-config config))
(bak/backup-db-roles! (merge (:db-role-config config)
(bak/backup-db-roles! (merge (:db-role-config config)
(:dry-run config)))
(bak/backup-db! (merge (:db-config config)
(:dry-run config))))
@ -37,7 +37,7 @@
(defn list-snapshots!
[]
(rc/list-snapshots! (:file-config config))
(rc/list-snapshots! (merge (:db-role-config config)
(rc/list-snapshots! (merge (:db-role-config config)
(:dry-run config)))
(rc/list-snapshots! (merge (:db-config config)
(:dry-run config))))
@ -47,7 +47,7 @@
[]
(pg/drop-create-db! (merge (:db-config config)
(:dry-run config)))
(rs/restore-db-roles! (merge (:db-role-config config)
(rs/restore-db-roles! (merge (:db-role-config config)
(:dry-run config)))
(rs/restore-db! (merge (:db-config config)
(:dry-run config)))