replace rsync with freefilesync (#286)
All checks were successful
ansible-lint / gitleaks (push) Successful in 57s
ansible-lint / Ansible Lint (push) Successful in 1m19s

the replacement gets replaced :-D

- old: 7a2ccbabb6

see also:

- ddaa6835b5
- 56e85dfa93

Reviewed-on: #286
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2025-01-18 19:08:01 +01:00 committed by Michael Grote
parent aeb12927b4
commit 563223e182
21 changed files with 90 additions and 67 deletions

View file

@ -71,7 +71,7 @@ volumes:
driver_opts: driver_opts:
type: "cifs" type: "cifs"
o: "user=navidrome,password={{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_navidrome', 'password') }}" o: "user=navidrome,password={{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_navidrome', 'password') }}"
device: "//192.168.2.54/musik/Musik" device: "//192.168.2.54/music/Musik"
######## Networks ######## ######## Networks ########
networks: networks:
traefik: traefik:

View file

@ -248,15 +248,6 @@ munin_node_plugins:
env.config_dir /etc/fail2ban env.config_dir /etc/fail2ban
user root user root
### mgrote_sync (für pbs + pve)
rsync_mirror_user_group: "{{ rsync_mirror_user }}"
rsync_mirror_user: rsync_mirror
rsync_mirror_bw_limit: "4m" # 4 Megabytes
rsync_mirror_timer: '*-*-* 0/8:5:0' # alle 8 h
rsync_mirror_private_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_private_key', 'notes') }}"
rsync_mirror_public_key: "{{ lookup('viczem.keepass.keepass', 'rsync_mirror_public_key', 'notes') }}"
# Ansible Variablen # Ansible Variablen
### User ### User
ansible_user: "ansible-user" ansible_user: "ansible-user"

View file

@ -1,4 +1,12 @@
--- ---
### mgrote_fileserver_smb
smb_workgroup: WORKGROUP
smb_min_protocol: "SMB2"
smb_client_min_protocol: "SMB2"
smb_client_max_protocol: "SMB3_11"
smb_enable_snapshots_dir: true
smb_enable_snapshots_shadow: true
### mgrote_netplan ### mgrote_netplan
netplan_configure: false netplan_configure: false

View file

@ -3,8 +3,8 @@
smb_users: smb_users:
- name: 'restic' - name: 'restic'
password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_restic', 'password') }}" password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_restic', 'password') }}"
- name: 'win10' - name: 'win3'
password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_win10', 'password') }}" password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_win3', 'password') }}"
- name: 'kodi' - name: 'kodi'
password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_kodi', 'password') }}" password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_kodi', 'password') }}"
- name: 'michaelgrote' - name: 'michaelgrote'
@ -22,51 +22,51 @@ smb_shares:
- name: 'videos' - name: 'videos'
path: '/shares_videos' path: '/shares_videos'
users_ro: 'kodi' users_ro: 'kodi'
users_rw: 'michaelgrote win10' users_rw: 'michaelgrote win3'
- name: 'scans' - name: 'scans'
path: '/shares_scans' path: '/shares_scans'
users_ro: ' michaelgrote' users_ro: ' michaelgrote'
users_rw: 'brother_ads2700w' users_rw: 'brother_ads2700w win3'
- name: 'papa_backup' - name: 'papa_backup'
path: '/shares_papa_backup' path: '/shares_papa_backup'
users_ro: 'michaelgrote' users_ro: 'michaelgrote'
users_rw: 'win10' users_rw: 'win3'
- name: 'backup' - name: 'backup'
path: '/shares_backup' path: '/shares_backup'
users_ro: '' users_ro: ''
users_rw: 'win10 michaelgrote' users_rw: 'win3 michaelgrote'
- name: 'archiv' - name: 'archiv'
path: '/shares_archiv' path: '/shares_archiv'
users_ro: '' users_ro: ''
users_rw: 'michaelgrote win10' users_rw: 'michaelgrote win3'
- name: 'musik' - name: 'music'
path: '/shares_music' path: '/shares_music'
users_ro: 'navidrome kodi ' users_ro: 'navidrome kodi '
users_rw: 'win10 michaelgrote' users_rw: 'win3 michaelgrote'
- name: 'tmp' - name: 'tmp'
path: '/shares_tmp' path: '/shares_tmp'
users_ro: 'win10' users_ro: ''
users_rw: 'kodi win10 michaelgrote' users_rw: 'kodi win3 michaelgrote'
- name: 'bilder' - name: 'bilder'
path: '/shares_bilder' path: '/shares_bilder'
users_ro: '' users_ro: ''
users_rw: ' michaelgrote win10' users_rw: ' michaelgrote win3'
- name: 'proxmox' - name: 'proxmox'
path: '/shares_pve_backup' path: '/shares_proxmox'
users_ro: 'michaelgrote' users_ro: 'michaelgrote'
users_rw: 'pve win10' users_rw: 'pve win3'
- name: 'restic' - name: 'restic'
path: '/shares_restic' path: '/shares_restic'
users_ro: '' users_ro: ''
users_rw: 'restic win10 michaelgrote' users_rw: 'restic win3 michaelgrote'
- name: 'buecher' - name: 'buecher'
path: '/shares_buecher' path: '/shares_buecher'
users_ro: '' users_ro: ''
users_rw: 'michaelgrote win10' users_rw: 'michaelgrote win3'
- name: 'programme' - name: 'programme'
path: '/shares_programme' path: '/shares_programme'
users_ro: '' users_ro: ''
users_rw: 'michaelgrote win10' users_rw: 'michaelgrote win3'
- name: 'vm' - name: 'vm'
path: '/shares_vm' path: '/shares_vm'
users_ro: '' users_ro: ''

View file

@ -1,4 +1,60 @@
--- ---
# smb, warum smb auf dem Backup-Server?
# Damit der Sync über FFS laufen kann...
### mgrote_fileserver_smb
smb_users:
- name: 'win3'
password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_win3', 'password') }}"
- name: 'michaelgrote'
password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_michaelgrote', 'password') }}"
smb_shares:
- name: 'videos'
path: '/backup/pve5/videos'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'scans'
path: '/backup/pve5/scans'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'backup'
path: '/backup/pve5/backup'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'archiv'
path: '/backup/pve5/archiv'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'music'
path: '/backup/pve5/music'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'tmp'
path: '/backup/pve5/tmp'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'bilder'
path: '/backup/pve5/bilder'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'restic'
path: '/backup/pve5/restic'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'buecher'
path: '/backup/pve5/buecher'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'programme'
path: '/backup/pve5/programme'
users_ro: 'michaelgrote'
users_rw: 'win3'
- name: 'proxmox'
path: '/backup/pve5/proxmox'
users_ro: 'michaelgrote'
users_rw: 'win3'
# pbs_* # pbs_*
pbs_datastores: pbs_datastores:
- name: zfs_backup - name: zfs_backup
@ -66,7 +122,7 @@ zfs_datasets: # DatenPools werden hier nicht verwaltet
snapdir: hidden snapdir: hidden
reservation: 1G reservation: 1G
acltype: posix # https:///docs.ansible.com/ansible-core/2.14/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user ; sonst kann die dotfiles-Rolle kein setfacl machen acltype: posix # https:///docs.ansible.com/ansible-core/2.14/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user ; sonst kann die dotfiles-Rolle kein setfacl machen
- dataset: backup/pve5/pve_backup - dataset: backup/pve5/proxmox
state: present state: present
recordsize: 1M recordsize: 1M
- dataset: backup/pve5/videos - dataset: backup/pve5/videos
@ -135,7 +191,7 @@ sanoid_datasets:
template: '14tage' template: '14tage'
recursive: 'yes' recursive: 'yes'
snapshots: true snapshots: true
- path: 'backup/pve5/pve_backup' - path: 'backup/pve5/proxmox'
template: '14tage' template: '14tage'
recursive: 'yes' recursive: 'yes'
snapshots: true snapshots: true
@ -167,6 +223,3 @@ sanoid_datasets:
recursive: 'no' # noqa yaml[truthy] recursive: 'no' # noqa yaml[truthy]
snapshots: true snapshots: true
template: '14tage' template: '14tage'
### mgrote_rsync
rsync_host_role: destination

View file

@ -60,7 +60,7 @@ zfs_datasets: # DatenPools werden hier nicht verwaltet
acltype: posix # https://docs.ansible.com/ansible-core/2.14/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user ; sonst kann die dotfiles-Rolle kein setfacl machen acltype: posix # https://docs.ansible.com/ansible-core/2.14/playbook_guide/playbooks_privilege_escalation.html#risks-of-becoming-an-unprivileged-user ; sonst kann die dotfiles-Rolle kein setfacl machen
- dataset: hdd_data/papa_backup - dataset: hdd_data/papa_backup
state: present state: present
- dataset: hdd_data/pve_backup - dataset: hdd_data/proxmox
state: present state: present
recordsize: 1M recordsize: 1M
- dataset: hdd_data/videos - dataset: hdd_data/videos
@ -116,7 +116,7 @@ sanoid_datasets:
template: '14tage' template: '14tage'
recursive: 'yes' recursive: 'yes'
snapshots: true snapshots: true
- path: 'hdd_data/pve_backup' - path: 'hdd_data/proxmox'
template: '14tage' template: '14tage'
recursive: 'yes' recursive: 'yes'
snapshots: true snapshots: true
@ -171,8 +171,8 @@ pve_bind_mounts:
mp_path_guest: /shares_videos mp_path_guest: /shares_videos
- vmid: 107 - vmid: 107
mp_nr: 2 mp_nr: 2
mp_path_host: /hdd_data/pve_backup mp_path_host: /hdd_data/proxmox
mp_path_guest: /shares_pve_backup mp_path_guest: /shares_proxmox
- vmid: 107 - vmid: 107
mp_nr: 3 mp_nr: 3
mp_path_host: /hdd_data/papa_backup mp_path_host: /hdd_data/papa_backup
@ -226,30 +226,3 @@ pve_pbs_datastore:
username: user_pve5@pbs username: user_pve5@pbs
password: "{{ lookup('viczem.keepass.keepass', 'pbs_pve_user', 'password') }}" password: "{{ lookup('viczem.keepass.keepass', 'pbs_pve_user', 'password') }}"
fingerprint: "7F:AC:54:75:1C:33:55:84:1E:1E:3A:15:5A:5E:AF:79:33:C9:D4:E1:C0:A0:1C:0D:9E:6A:EA:82:F9:27:57:79" fingerprint: "7F:AC:54:75:1C:33:55:84:1E:1E:3A:15:5A:5E:AF:79:33:C9:D4:E1:C0:A0:1C:0D:9E:6A:EA:82:F9:27:57:79"
### mgrote_sync
rsync_host_role: source
rsync_mirror_dirs: # bei Src+Dest KEIN "/" am Ende
- src: /hdd_data/archiv
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/archiv"
- src: /hdd_data/backup
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/backup"
- src: /hdd_data/bilder
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/bilder"
- src: /hdd_data/buecher
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/buecher"
- src: /hdd_data/music
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/music"
- src: /hdd_data/programme
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/programme"
- src: /hdd_data/pve_backup
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/pve_backup"
- src: /hdd_data/restic
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/restic"
- src: /hdd_data/scans
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/scans"
- src: /hdd_data/tmp
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/tmp"
- src: /hdd_data/videos
dest: "{{ rsync_mirror_user }}@pbs.mgrote.net:/backup/pve5/videos"
# hdd_data/vm ist mit Absicht nicht dabei, zu groß

Binary file not shown.

View file

@ -19,5 +19,5 @@
tags: "pbs_users" tags: "pbs_users"
- role: mgrote_pbs_datastores - role: mgrote_pbs_datastores
tags: "pbs_datastores" tags: "pbs_datastores"
- role: mgrote_rsync - role: mgrote_fileserver_smb
tags: "rsync" tags: "smb"

View file

@ -24,5 +24,3 @@
tags: "lxc-profile" tags: "lxc-profile"
- role: mgrote_pbs_pve_integration - role: mgrote_pbs_pve_integration
tags: "pbs" tags: "pbs"
- role: mgrote_rsync
tags: "rsync"