No description
Find a file
2025-01-24 15:27:15 +01:00
dev revive initial 2024-08-16 08:29:49 +02:00
docs feat: doc for backup process 2025-01-24 14:27:40 +01:00
infrastructure/backup bump version to: 5.3.1-SNAPSHOT 2025-01-13 13:15:44 +01:00
src/dda/backup add mor doc related to change passwd 2025-01-24 14:58:37 +01:00
test add additional restore cleanup option 2025-01-10 08:25:29 +01:00
.cljstyle revive initial 2024-08-16 08:29:49 +02:00
.dir-locals.el revive initial 2024-08-16 08:29:49 +02:00
.gitattributes revive initial 2024-08-16 08:29:49 +02:00
.gitignore prepare release 2024-08-22 08:34:34 +02:00
.gitlab-ci.yml fix ci 2024-12-27 13:44:39 +01:00
build.clj init command now is working 2024-08-16 14:40:35 +02:00
build.py fix ci 2024-08-22 08:42:51 +02:00
CHANGELOG.md first functionality 2024-08-16 12:32:59 +02:00
deps.edn bump version to: 5.3.1-SNAPSHOT 2025-01-13 13:15:44 +01:00
LICENSE.md initial commit 2020-09-29 12:13:36 +02:00
Makefile init command now is working 2024-08-16 14:40:35 +02:00
pom.xml revive initial 2024-08-16 08:29:49 +02:00
README.md ad some examples 2025-01-24 15:27:15 +01:00
tests.edn revive initial 2024-08-16 08:29:49 +02:00

dda-backup

Clojars Project pipeline status

DeltaChat chat over e-mail | M meissa@social.meissa-gmbh.de | Blog | Website

Images are available at https://hub.docker.com/r/domaindrivenarchitecture/dda-backup

Usage example

#!/usr/bin/env bb

(require '[babashka.tasks :as tasks]
         '[dda.backup.restic :as rc]
         '[dda.backup.backup :as bak]
         '[dda.backup.restore :as rs])

(def config {:restic-repo
             :debug true
             :restic-repository "/restic-repo"
             :password-file "/tmp/file_password"
             :new-password-file "/tmp/file_new_password"
             :backup-path "files"
             :execution-directory "/var/backups/"
             :files ["test-backup"]
             :restore-target-directory "test-restore"})

(defn prepare!
  []
  (tasks/shell "mkdir" "-p" "/var/backups/test-backup")
  (spit "/var/backups/test-backup/file" "I was here")
  (tasks/shell "mkdir" "-p" "/var/backups/test-restore"))

(defn restic-repo-init!
  []
  (println "\nrestic-repo-init!")
  (rc/init! config))

(defn restic-backup!
  []
  (println "\nrestic-backup!")
  (bak/backup-file! config))

(defn list-snapshots!
  []
  (println "\nlist-snapshots!")
  (rc/list-snapshots! config))

(defn restic-restore!
  []
  (println "\nrestic-restore!")
  (rs/restore-file! config))

(defn change-password!
  []
  (println "\nchange-password!")
  (rc/change-password! config))

(defn restic-backup-with-new!
  []
  (println "\nrestic-backup with new!")
  (bak/backup-file! (merge {:password-file "/tmp/file_new_password"} config)))

(defn list-snapshots-with-new!
  []
  (println "\nlist-snapshots with new!")
  (rc/list-snapshots! (merge {:password-file "/tmp/file_new_password"} config)))


(prepare!)
(restic-repo-init!)
(restic-backup!)
(list-snapshots!)
(restic-restore!)
(change-password!)
(restic-backup!)
(list-snapshots!)
(restic-restore!)
(restic-backup-with-new!)
(list-snapshots-with-new!)

Real Life Examples

see:

Development & mirrors

Development happens at: https://repo.prod.meissa.de/meissa/dda-backup

Mirrors are:

For more details about our repository model see: https://repo.prod.meissa.de/meissa/federate-your-repos

License

Copyright © 2024, 2025 meissa GmbH Published under apache2.0 license Pls. find licenses of our subcomponents here