Compare commits

...

2 Commits

Author SHA1 Message Date
Ricard Illa c893b597d1 add backups to btrbk subvolumes 2023-01-03 18:30:37 +01:00
Ricard Illa 2c4c541cf5 backups lbu to a more permanent location 2023-01-03 18:26:16 +01:00
3 changed files with 19 additions and 3 deletions

View File

@ -190,6 +190,18 @@
PASSWORD: '{{ lbu_password }}'
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
- name: create lbu backups directory
file:
state: directory
path: /mnt/backups/lbu
# todo: use less hardcoding
- name: make a more permanent lbu backup
copy:
src: "{{ lbu_backupdir }}/{{ ansible_hostname }}.apkovl.tar.gz.aes-256-cbc"
dest: "/mnt/backups/lbu/{{ ansible_hostname }}.apkovl.tar.gz.aes-256-cbc.{{ ansible_date_time.iso8601 }}"
remote_src: true
- name: mount ro
hosts:
- pikvm
@ -197,6 +209,3 @@
post_tasks:
- name: mount ro
command: /usr/local/bin/ro
# todo:
# setup-apkcache to use /media/mmcblk0p2

View File

@ -22,3 +22,4 @@ volume /mnt/btr_pool
target ssh://narwhal/mnt/btr_backup/suricata
subvolume home
subvolume rancher_config
subvolume backups

View File

@ -99,6 +99,12 @@ all:
opts: "subvol=home,noatime,compress=zstd"
passno: "0"
- src: "/dev/mapper/disk0"
path: "/mnt/backups"
fstype: "btrfs"
opts: "subvol=backups,noatime,compress=zstd"
passno: "0"
- src: "/dev/mapper/disk0"
path: "/opt"
fstype: "btrfs"