diff --git a/host_vars/warpsrvext b/host_vars/warpsrvext index 1e89f59fb8950b07147b389ced61c57d4cfd43e0..3691f9540aa5cc88542dbc437e5c6c15332acdde 100644 --- a/host_vars/warpsrvext +++ b/host_vars/warpsrvext @@ -8,6 +8,7 @@ motd_lines: debian_sources: - "deb http://repo.myloc.de/debian jessie main non-free contrib" - "deb http://security.debian.org/ jessie/updates main contrib non-free" + - "deb http://ftp.debian.org/debian jessie-backports main" debian_keys: @@ -18,3 +19,11 @@ administratorenteam: - "commander1024" +borgbackup_user: + + warpzone: + + sshkeys: + - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID2EdE/pfN3L91XytQ3+KXLTxAvAGSUE6TKpHTcOcJWw root@warpsrvint" + - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIENYus4S4XOaGHVL4B6vbnIrovtqaCT1lbEF73StiTt+ root@webserver" + diff --git a/host_vars/warpsrvint b/host_vars/warpsrvint index e0a96534ced2b349d6ffa6a252ed600d87441942..741dfea354ad4da9daf38e2670413c31a61170ac 100644 --- a/host_vars/warpsrvint +++ b/host_vars/warpsrvint @@ -9,6 +9,7 @@ debian_sources: - "deb http://debian.uni-duisburg-essen.de/debian/ jessie main non-free contrib" - "deb http://security.debian.org/ jessie/updates main contrib non-free" - "deb http://debian.uni-duisburg-essen.de/debian/ jessie-updates main contrib non-free" + - "deb http://ftp.debian.org/debian jessie-backports main" - "deb https://apt.dockerproject.org/repo debian-jessie main" - "deb [arch=amd64] https://download.docker.com/linux/debian jessie stable" @@ -25,3 +26,67 @@ administratorenteam: - "sandhome" - "sandmobil" # - "ennox" (ssh key fehlt noch) + + +# Definition von Borgbackup Repositories +borgbackup_repos: + + warpsrvext: + + # URL des Repos + repo: "ssh://warpzone@217.79.181.126:/data/warpzone/warpsrvint" + + # Repo-spezifische Optionen zum Aufruf von Borgbackup + # z.B. bei Sicherungen zu rsync.net ist --remote-path=borg1 erforderlich + options: "" + + # Compression Options, z,b. "zlib,5, "zstd,5" + compression: "zlib,5" + + # Prune Optionen + prune: "--keep-within=2d --keep-daily=7 --keep-weekly=4 --keep-monthly=6" + + # Backup Schedule + weekday: "*" + hour: "6" + minute: "0" + + # Zusätzliche Verzeichnisse, die nur in diesem Backup gesichtert werden sollen + # directories: + + voidhome: + + # URL des Repos + repo: "ssh://warpzone@130.180.13.106:5201/data/warpzone/warpsrvint" + + # Repo-spezifische Optionen zum Aufruf von Borgbackup + # z.B. bei Sicherungen zu rsync.net ist --remote-path=borg1 erforderlich + options: "" + + # Compression Options, z,b. "zlib,5, "zstd,5" + compression: "zlib,5" + + # Prune Optionen + prune: "--keep-within=2d --keep-daily=7 --keep-weekly=4 --keep-monthly=6" + + # Backup Schedule + weekday: "*" + hour: "*/5" + minute: "0" + + # Zusätzliche Verzeichnisse, die nur in diesem Backup gesichtert werden sollen + # directories: + + +# Definition der Verzeichnisse, die in allen Borgbackup Repos gesichert werden sollen +borgbackup_directories: + - "/etc/" + - "/srv/" + + +borgbackup_user: + + warpzone: + + sshkeys: + - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIENYus4S4XOaGHVL4B6vbnIrovtqaCT1lbEF73StiTt+ root@webserver" diff --git a/host_vars/webserver b/host_vars/webserver index 402850d03a5134c2a940a3d7d0efe70fa0b0289f..d628a460bd3e1ae34a1e5b79a9d7d5ef3e4810cb 100644 --- a/host_vars/webserver +++ b/host_vars/webserver @@ -15,19 +15,6 @@ debian_sources: debian_keys: - "https://download.docker.com/linux/debian/gpg" -borgbackup_weekday: "*" -borgbackup_hour: "4" -borgbackup_minute: "0" - -borgbackup_directories: - - "/etc/" - - "/srv/" - -borgbackup_prune: - - "--keep-within=2d" - - "--keep-daily=7" - - "--keep-weekly=4" - - "--keep-monthly=6" letsencrypt_tos_sha256: 6373439b9f29d67a5cd4d18cbc7f264809342dbf21cb2ba2fc7588df987a6221 @@ -50,4 +37,82 @@ administratorenteam: - "sandhome" - "sandmobil" - "commander1024" - \ No newline at end of file + + # Definition von Borgbackup Repositories +borgbackup_repos: + + warpsrvext: + + # URL des Repos + repo: "ssh://warpzone@217.79.181.126:/data/warpzone/webserver" + + # Repo-spezifische Optionen zum Aufruf von Borgbackup + # z.B. bei Sicherungen zu rsync.net ist --remote-path=borg1 erforderlich + options: "" + + # Compression Options, z,b. "zlib,5, "zstd,5" + compression: "zlib,5" + + # Prune Optionen + prune: "--keep-within=2d --keep-daily=7 --keep-weekly=4 --keep-monthly=6" + + # Backup Schedule + weekday: "*" + hour: "*/4" + minute: "0" + + # Zusätzliche Verzeichnisse, die nur in diesem Backup gesichtert werden sollen + # directories: + + warpsrvint: + + # URL des Repos + repo: "ssh://warpzone@192.168.0.201:22/data/warpzone/webserver" + + # Repo-spezifische Optionen zum Aufruf von Borgbackup + # z.B. bei Sicherungen zu rsync.net ist --remote-path=borg1 erforderlich + options: "" + + # Compression Options, z,b. "zlib,5, "zstd,5" + compression: "zlib,5" + + # Prune Optionen + prune: "--keep-within=2d --keep-daily=7 --keep-weekly=4 --keep-monthly=6" + + # Backup Schedule + weekday: "*" + hour: "*/5" + minute: "0" + + # Zusätzliche Verzeichnisse, die nur in diesem Backup gesichtert werden sollen + # directories: + + voidhome: + + # URL des Repos + repo: "ssh://warpzone@130.180.13.106:5201/data/warpzone/webserver" + + # Repo-spezifische Optionen zum Aufruf von Borgbackup + # z.B. bei Sicherungen zu rsync.net ist --remote-path=borg1 erforderlich + options: "" + + # Compression Options, z,b. "zlib,5, "zstd,5" + compression: "zlib,5" + + # Prune Optionen + prune: "--keep-within=2d --keep-daily=7 --keep-weekly=4 --keep-monthly=6" + + # Backup Schedule + weekday: "*" + hour: "*/4" + minute: "0" + + # Zusätzliche Verzeichnisse, die nur in diesem Backup gesichtert werden sollen + # directories: + + +# Definition der Verzeichnisse, die in allen Borgbackup Repos gesichert werden sollen +borgbackup_directories: + - "/etc/" + - "/srv/" + diff --git a/site.yml b/site.yml index dc39bc0f60d5cb9df53a0b501e5179ca78bb79b9..970bc0193079a11f5d3d3abff2d24618688d8dd7 100644 --- a/site.yml +++ b/site.yml @@ -5,6 +5,7 @@ - include: vorstandspi/main.yml - include: warphab/main.yml - include: warpsrvint/main.yml +- include: warpsrvext/main.yml - include: webserver/main.yml diff --git a/warpsrvext/main.yml b/warpsrvext/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..60eb14557860100241484164bef51b520bb79d6c --- /dev/null +++ b/warpsrvext/main.yml @@ -0,0 +1,7 @@ +--- + +- hosts: warpsrvext + remote_user: root + roles: + - { role: ../common/borgserver, tags: borgserver } + diff --git a/warpsrvint/main.yml b/warpsrvint/main.yml index d3f419156299f9b0275d98b5193d42c14bd62b8e..8cbc2373754b715cac8bfa10bd3e6bedb6d0d320 100644 --- a/warpsrvint/main.yml +++ b/warpsrvint/main.yml @@ -3,6 +3,8 @@ - hosts: warpsrvint remote_user: root roles: + - { role: ../common/borgbackup, tags: borgbackup } + - { role: ../common/borgserver, tags: borgserver } - { role: ../common/prometheus-node, tags: prometheus-node } - { role: ../common/docker, tags: docker } - { role: nginx, tags: nginx }