2023-06-23 16:04:19 +02:00
|
|
|
---
|
|
|
|
# pbs_*
|
|
|
|
pbs_datastores:
|
|
|
|
- name: zfs_backup
|
|
|
|
path: /backup/pbs_data
|
|
|
|
gc_schedule: "sat 19:00"
|
|
|
|
|
|
|
|
pbs_prune_jobs:
|
|
|
|
- name: standard
|
|
|
|
schedule: "sat 18:15"
|
|
|
|
store: zfs_backup
|
2023-07-21 12:27:20 +02:00
|
|
|
keep_last: 1
|
|
|
|
keep_hourly: 3
|
2023-07-16 12:48:07 +02:00
|
|
|
keep_daily: 3
|
|
|
|
|
2023-06-23 16:04:19 +02:00
|
|
|
pbs_permissions:
|
|
|
|
- user: user_pve5@pbs
|
|
|
|
datastore: zfs_backup
|
|
|
|
role: DatastoreBackup
|
|
|
|
|
|
|
|
pbs_users:
|
|
|
|
- name: user_pve5
|
2023-07-05 11:47:57 +02:00
|
|
|
password: "{{ lookup('keepass', 'pbs_pve_user', 'password') }}"
|
2023-06-23 16:04:19 +02:00
|
|
|
realm: pbs
|
|
|
|
# rpool ist unverschlüsselt als Boot-Medium
|
|
|
|
# entschlüsseln nach Boot mit: sudo zpool import -d /dev/disk/by-id/ -a && sudo zfs mount -a -l
|
|
|
|
|
|
|
|
## backup
|
|
|
|
### sudo zpool create -o ashift=12 -o feature@encryption=enabled -O encryption=on -O keylocation=prompt -O keyformat=passphrase backup /dev/disk/by-id/ata-TOSHIBA_MG09ACA18TE_Z1B0A28LFJDH
|
|
|
|
|
|
|
|
# mgrote.zfs_manage_datasets
|
|
|
|
### mgrote.zfs_extra
|
|
|
|
# Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_*
|
|
|
|
zfs_datasets: # DatenPools werden hier nicht verwaltet
|
|
|
|
# rpool - System-Datasets
|
|
|
|
- dataset: rpool
|
|
|
|
state: present
|
|
|
|
compression: zstd
|
|
|
|
sync: disabled
|
|
|
|
xattr: sa
|
|
|
|
dnodesize: auto
|
|
|
|
atime: on
|
|
|
|
snapdir: hidden
|
|
|
|
reservation: 1G
|
|
|
|
refreservation: 10G
|
|
|
|
- dataset: rpool/ROOT
|
|
|
|
state: present
|
|
|
|
refreservation: 10G
|
|
|
|
- dataset: rpool/ROOT/pbs-1
|
|
|
|
state: present
|
|
|
|
refreservation: 10G
|
|
|
|
# backup-pool
|
|
|
|
- dataset: backup/pbs_data
|
|
|
|
state: present
|
|
|
|
quota: 1TB
|
2023-07-05 11:47:57 +02:00
|
|
|
- dataset: backup/pve5
|
|
|
|
state: present
|
|
|
|
canmount: off
|
2023-06-23 16:04:19 +02:00
|
|
|
# Variablen für mgrote.zfs_health/trim/scrub/zed/arc_mem/ sind zusammengefasst unter zfs_extra_*
|
2023-06-25 17:27:47 +02:00
|
|
|
zfs_extra_arc_max_size: "4294967296" # 4GB in Bytes
|
2023-06-23 16:04:19 +02:00
|
|
|
zfs_extra_zfs_pools:
|
|
|
|
- name: "rpool"
|
|
|
|
systemd_timer_schedule: "*-01,04,07,10-01 23:00" # jeden ersten eines jeden Quartals
|
|
|
|
- name: "backup"
|
|
|
|
systemd_timer_schedule: "*-01,04,07,10-01 23:00"
|
|
|
|
|
|
|
|
### mgrote.zfs_sanoid
|
2023-07-05 11:47:57 +02:00
|
|
|
sanoid_snaps_enable: true
|
|
|
|
## syncoid
|
|
|
|
sanoid_syncoid_destination_host: true
|
|
|
|
sanoid_syncoid_ssh_privkey: "{{ lookup('keepass', 'sanoid_syncoid_private_key', 'notes') }}"
|
|
|
|
sanoid_syncoid_timer: '*-*-* *:00:00' # jede Stunde
|
|
|
|
sanoid_syncoid_bwlimit: 50M # 30MB/s
|
|
|
|
sanoid_syncoid_datasets_sync:
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/pve_backup
|
|
|
|
source_dataset: hdd_data_raidz/pve_backup
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/videos
|
|
|
|
source_dataset: hdd_data_raidz/videos
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/music
|
|
|
|
source_dataset: hdd_data_raidz/music
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/tmp
|
|
|
|
source_dataset: hdd_data_raidz/tmp
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/archiv
|
|
|
|
source_dataset: hdd_data_raidz/archiv
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/bilder
|
|
|
|
source_dataset: hdd_data_raidz/bilder
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/hm
|
|
|
|
source_dataset: hdd_data_raidz/hm
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/scans
|
|
|
|
source_dataset: hdd_data_raidz/scans
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/restic
|
|
|
|
source_dataset: hdd_data_raidz/restic
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/backup
|
|
|
|
source_dataset: hdd_data_raidz/backup
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/buecher
|
|
|
|
source_dataset: hdd_data_raidz/buecher
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/programme
|
|
|
|
source_dataset: hdd_data_raidz/programme
|
|
|
|
|
2023-07-17 22:20:44 +02:00
|
|
|
- source_host: 192.168.2.16 # pve5, weil pbs den fqdn nicht auflösen kann
|
2023-07-05 11:47:57 +02:00
|
|
|
destination_mount_check: backup
|
|
|
|
destination_dataset: backup/pve5/vm
|
|
|
|
source_dataset: hdd_data_raidz/vm
|
|
|
|
|
|
|
|
# sanoid
|
2023-06-23 16:04:19 +02:00
|
|
|
sanoid_datasets:
|
|
|
|
### rpool
|
|
|
|
- path: rpool
|
|
|
|
recursive: 'no'
|
|
|
|
snapshots: true
|
|
|
|
template: 'pve3tage'
|
|
|
|
- path: rpool/ROOT
|
|
|
|
recursive: 'no'
|
|
|
|
snapshots: true
|
|
|
|
template: 'pve3tage'
|
|
|
|
- path: rpool/ROOT/pbs-1
|
|
|
|
recursive: 'no'
|
|
|
|
snapshots: true
|
|
|
|
template: 'pve3tage'
|
|
|
|
### backup
|
|
|
|
- path: backup/pbs_data
|
|
|
|
recursive: 'no'
|
|
|
|
snapshots: true
|
2023-07-05 11:47:57 +02:00
|
|
|
template: '3tage'
|
2023-07-17 22:20:44 +02:00
|
|
|
|
2023-07-17 22:39:17 +02:00
|
|
|
### mgrote.munin-node
|
|
|
|
munin_node_allowed_cidrs: [192.168.3.0/24]
|