reconfigure most backups with new system

This commit is contained in:
Jef Roosens 2026-04-04 21:42:56 +02:00
parent 77e6f77aba
commit 74f8edf024
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49

View file

@ -4,10 +4,10 @@
roles: roles:
- role: any.common.static-ip - role: any.common.static-ip
vars: vars:
interface: 'enp1s0' interface: "enp2s0"
static_ip: '192.168.0.2' static_ip: "192.168.0.2"
broadcast_ip: '192.168.0.255' broadcast_ip: "192.168.0.255"
router_ip: '192.168.0.1' router_ip: "192.168.0.1"
- any.common.ssh - any.common.ssh
- any.tools.ufw - any.tools.ufw
tags: networking tags: networking
@ -19,6 +19,30 @@
- any.common.raid - any.common.raid
tags: raid tags: raid
- name: Set up backup systems
hosts: emma
become: true
tags: backups
roles:
- role: any.tools.restic
vars:
restic_version: "0.18.1"
- role: any.tools.otel-cli
vars:
otel_cli_version: "0.4.5"
# TODO restic-rest subvolumes
- role: any.software.restic-rest
vars:
restic_rest_data_dir: "/mnt/data1/restic-rest"
restic_rest_version: "0.12.1"
- name: Set up OTEL collector
hosts: emma
tags: [otel-collector, otel]
become: true
roles:
- any.software.otel-collector
- name: Set up Jellyfin - name: Set up Jellyfin
hosts: emma hosts: emma
become: yes become: yes
@ -28,10 +52,10 @@
- name: Set up Miniflux - name: Set up Miniflux
hosts: emma hosts: emma
become: yes
tags: miniflux tags: miniflux
roles: roles:
- role: any.common.btrfs-subvolumes - role: any.common.btrfs-subvolumes
become: true
vars: vars:
subvolumes: subvolumes:
- filesystem_uuid: "{{ btrfs_nvme.uuid }}" - filesystem_uuid: "{{ btrfs_nvme.uuid }}"
@ -40,10 +64,20 @@
- role: any.software.miniflux-podman - role: any.software.miniflux-podman
vars: vars:
postgres_data_dir: '/data/miniflux/postgres' postgres_data_dir: '/data/miniflux/postgres'
- role: any.tools.backup-scripts
become: true
vars:
backups:
- name: "miniflux-postgres"
type: "podman-postgres"
user: "debian"
container: "systemd-miniflux-postgres"
pg_user: "miniflux"
database: "miniflux"
- name: Set up WebDAV - name: Set up WebDAV
hosts: emma hosts: emma
become: yes become: true
tags: webdav tags: webdav
roles: roles:
- role: any.common.btrfs-subvolumes - role: any.common.btrfs-subvolumes
@ -54,12 +88,19 @@
name: "/webdav/data" name: "/webdav/data"
- role: any.software.webdav - role: any.software.webdav
vars: vars:
webdav_version: '5.7.4' webdav_version: "5.7.4"
data_dir: '{{ btrfs_raid.path }}/webdav/data' data_dir: "{{ btrfs_raid.path }}/webdav/data"
webdav_user: "{{ vault_webdav_user }}" webdav_user: "{{ vault_webdav_user }}"
webdav_password: "{{ vault_webdav_password }}" webdav_password: "{{ vault_webdav_password }}"
webdav_password_bcrypt: "{{ vault_webdav_password_bcrypt }}" webdav_password_bcrypt: "{{ vault_webdav_password_bcrypt }}"
- role: any.tools.backup-scripts
vars:
backups:
- name: "webdav-data"
type: "btrfs-subvolume"
path: "{{ btrfs_raid.path }}/webdav/data"
- name: Set up Gitea - name: Set up Gitea
hosts: emma hosts: emma
@ -87,10 +128,25 @@
- role: any.software.gitea - role: any.software.gitea
vars: vars:
gitea_data_dir: '{{ btrfs_raid.path }}/gitea/data' gitea_data_dir: "{{ btrfs_raid.path }}/gitea/data"
gitea_lfs_dir: '{{ btrfs_raid.path }}/gitea/lfs' gitea_lfs_dir: "{{ btrfs_raid.path }}/gitea/lfs"
gitea_repositories_dir: '{{ btrfs_nvme.path }}/data/gitea/repositories' gitea_repositories_dir: "{{ btrfs_nvme.path }}/data/gitea/repositories"
postgres_data_dir: '{{ btrfs_nvme.path }}/data/gitea/postgres' postgres_data_dir: "{{ btrfs_nvme.path }}/data/gitea/postgres"
- role: any.tools.backup-scripts
become: true
vars:
backups:
# TODO: gitea-data, gitea-lfs
- name: "gitea-postgres"
type: "podman-postgres"
user: "debian"
container: "systemd-gitea-postgres"
pg_user: "gitea"
database: "gitea"
- name: "gitea-repositories"
type: "btrfs-subvolume"
path: "/data/gitea/repositories"
- name: Set up Otter - name: Set up Otter
hosts: emma hosts: emma
@ -105,7 +161,13 @@
name: "/@rootfs/otter/data" name: "/@rootfs/otter/data"
- role: any.software.otter - role: any.software.otter
vars: vars:
data_dir: '{{ btrfs_nvme.path }}/data/otter/data' data_dir: "{{ btrfs_nvme.path }}/data/otter/data"
- role: any.tools.backup-scripts
vars:
backups:
- name: 'otter-data'
type: 'btrfs-subvolume'
path: '/data/otter/data'
- name: Set up Nefarious - name: Set up Nefarious
hosts: emma hosts: emma
@ -144,6 +206,13 @@
- role: any.software.actual-podman - role: any.software.actual-podman
vars: vars:
data_dir: '/data/actual/data' data_dir: '/data/actual/data'
- role: any.tools.backup-scripts
become: true
vars:
backups:
- name: 'actual-data'
type: 'btrfs-subvolume'
path: '/data/actual/data'
- name: Set up Baikal - name: Set up Baikal
hosts: emma hosts: emma
@ -165,8 +234,18 @@
become: true become: true
- role: any.software.baikal-podman - role: any.software.baikal-podman
vars: vars:
baikal_config_dir: '/data/baikal/config' baikal_config_dir: "/data/baikal/config"
baikal_specific_dir: '/data/baikal/Specific' baikal_specific_dir: "/data/baikal/Specific"
- role: any.tools.backup-scripts
become: true
vars:
backups:
- name: 'baikal-config'
type: 'btrfs-subvolume'
path: '/data/baikal/config'
- name: 'baikal-Specific'
type: 'btrfs-subvolume'
path: '/data/baikal/Specific'
- name: Set up Syncthing - name: Set up Syncthing
hosts: emma hosts: emma
@ -187,15 +266,16 @@
name: "/syncthing/home" name: "/syncthing/home"
- role: any.software.syncthing - role: any.software.syncthing
vars: vars:
syncthing_data_dir: '/mnt/data1/syncthing/data' syncthing_data_dir: "/mnt/data1/syncthing/data"
syncthing_home_dir: '/mnt/data1/syncthing/home' syncthing_home_dir: "/mnt/data1/syncthing/home"
syncthing_config_dir: '/mnt/data1/syncthing/config' syncthing_config_dir: "/mnt/data1/syncthing/config"
- name: Set up Monica - name: Set up Monica
hosts: emma hosts: emma
tags: monica tags: monica
roles: roles:
- role: any.common.btrfs-subvolumes - role: any.common.btrfs-subvolumes
become: true
vars: vars:
subvolumes: subvolumes:
- filesystem_uuid: "{{ btrfs_nvme.uuid }}" - filesystem_uuid: "{{ btrfs_nvme.uuid }}"
@ -204,17 +284,27 @@
- filesystem_uuid: "{{ btrfs_nvme.uuid }}" - filesystem_uuid: "{{ btrfs_nvme.uuid }}"
filesystem_path: "{{ btrfs_nvme.path }}" filesystem_path: "{{ btrfs_nvme.path }}"
name: "/@rootfs/data/monica/mariadb" name: "/@rootfs/data/monica/mariadb"
become: true
- role: any.software.monica-podman - role: any.software.monica-podman
vars: vars:
monica_data_dir: '/data/monica/data' monica_data_dir: "/data/monica/data"
mariadb_data_dir: '/data/monica/mariadb' mariadb_data_dir: "/data/monica/mariadb"
# - role: any.software.syncthing
# vars: - role: any.tools.backup-scripts
# syncthing_data_dir: '/mnt/data1/syncthing/data' become: true
# syncthing_home_dir: '/mnt/data1/syncthing/home' vars:
# syncthing_config_dir: '/mnt/data1/syncthing/config' backups:
# - name: 'monica-data'
type: 'btrfs-subvolume'
path: '/data/monica/config'
- name: 'monica-mariadb'
type: 'podman-mysql'
user: 'debian'
container: 'systemd-monica-mariadb'
mysql_user: 'monica'
mysql_password: 'monica'
database: 'monica'
- name: Set up Recipya - name: Set up Recipya
hosts: emma hosts: emma
tags: recipya tags: recipya
@ -228,7 +318,14 @@
become: true become: true
- role: any.software.recipya-podman - role: any.software.recipya-podman
vars: vars:
data_dir: '/data/recipya/data' data_dir: "/data/recipya/data"
- role: any.tools.backup-scripts
become: true
vars:
backups:
- name: "recipya-data"
type: "btrfs-subvolume"
path: "/data/recipya/data"
- name: Set up Immich - name: Set up Immich
hosts: emma hosts: emma
@ -243,16 +340,30 @@
- filesystem_uuid: "{{ btrfs_raid.uuid }}" - filesystem_uuid: "{{ btrfs_raid.uuid }}"
filesystem_path: "{{ btrfs_raid.path }}" filesystem_path: "{{ btrfs_raid.path }}"
name: "/photos/immich-upload" name: "/photos/immich-upload"
- filesystem_uuid: "{{ btrfs_nvme.uuid }}"
filesystem_path: "{{ btrfs_nvme.path }}"
name: "/@rootfs/data/immich/model-cache"
become: true become: true
- role: any.software.immich-podman - role: any.software.immich-podman
vars: vars:
immich_postgres_dir: '/data/immich/postgres' immich_postgres_dir: "/data/immich/postgres"
immich_upload_dir: '/mnt/data1/photos/immich-upload' immich_upload_dir: "/mnt/data1/photos/immich-upload"
immich_model_cache_dir: "/data/immich/model-cache"
immich_libraries: immich_libraries:
- path: '/mnt/data1/photos/jef' - path: "/mnt/data1/photos/jef"
name: 'jef' name: "jef"
- path: '/mnt/data1/photos/lambroek' - path: "/mnt/data1/photos/lambroek"
name: 'lambroek' name: "lambroek"
- role: any.tools.backup-scripts
become: true
vars:
backups:
- name: "immich-postgres"
type: "podman-postgres"
user: "debian"
container: "systemd-immich-postgres"
pg_user: "immich"
database: "immich"
- name: Set up Tuwunel - name: Set up Tuwunel
hosts: emma hosts: emma
@ -268,3 +379,49 @@
- role: any.software.tuwunel - role: any.software.tuwunel
vars: vars:
tuwunel_data_dir: '/data/matrix-tuwunel/data' tuwunel_data_dir: '/data/matrix-tuwunel/data'
- role: any.tools.backup-scripts
vars:
backups:
- name: "tuwunel-data"
type: "btrfs-subvolume"
path: "/data/matrix-tuwunel/data"
- name: Set up GreptimeDB
hosts: emma
tags: [greptimedb, otel]
roles:
- role: any.common.btrfs-subvolumes
vars:
subvolumes:
- filesystem_uuid: "{{ btrfs_nvme.uuid }}"
filesystem_path: "{{ btrfs_nvme.path }}"
name: "/@rootfs/data/greptimedb/data"
become: true
- role: any.software.greptimedb-podman
vars:
greptimedb_data_dir: "/data/greptimedb/data"
- name: Set up Grafana
hosts: emma
tags: [grafana, otel]
roles:
- role: any.common.btrfs-subvolumes
vars:
subvolumes:
- filesystem_uuid: "{{ btrfs_nvme.uuid }}"
filesystem_path: "{{ btrfs_nvme.path }}"
name: "/@rootfs/data/grafana/data"
- filesystem_uuid: "{{ btrfs_nvme.uuid }}"
filesystem_path: "{{ btrfs_nvme.path }}"
name: "/@rootfs/data/grafana/logs"
- role: any.software.grafana
vars:
grafana_data_dir: "/data/grafana/data"
grafana_logs_dir: "/data/grafana/logs"
- role: any.tools.backup-scripts
vars:
backups:
- name: "grafana-data"
type: "btrfs-subvolume"
path: "/data/grafana/data"
become: true