Add fsdr backup on fsdrnas

This commit is contained in:
Daniel A. Maierhofer
2019-02-23 00:39:44 +01:00
parent b00ef83616
commit 2509e35998
6 changed files with 85 additions and 1 deletions

20
doc/fsdrnas.yml Normal file
View File

@@ -0,0 +1,20 @@
# fsdrnas
## Enable SSH and prohibit-password
```shell
xbps-install -Su
vim /etc/ssh/sshd_config
ln -s /etc/sv/sshd/ /var/service/
```
# Create RAID
```shell
xbps-install mdadm
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
mkfs.btrfs -f /dev/md0
cat /proc/mdstat
```
## Check disks
```shell
xbps-install smartmontools
smartctl -a /dev/sda
smartctl -a /dev/sdb
```

47
host_vars/fsdr Normal file
View File

@@ -0,0 +1,47 @@
inventory_hostname: fsdr.htu.tuwien.ac.at
inventory_hostname_short: fsdr
borgbackup_install_from_repo: False
borgbackup_encryption_mode: "none"
borgbackup_client_backup_server: fsdrnas
borgbackup_create_jobs:
- name: system
options: "--lock-wait 7200"
day: "*"
hour: 0 # default value = 1
minute: 0 # default value = 0
random_hour: 5 # default value : ignore randomization
random_minute: 59 # default value : ignore randomization
directories:
- "/srv"
- "/etc"
- "/home"
- "/root"
- "/var/lib/mailman"
- "/var/www"
- "/var/lib/automysqlbackup/daily/"
excludes: []
borgbackup_prune_enabled: yes
borgbackup_prune_jobs:
- name: system
prune_options: "--lock-wait 7200 --keep-daily=7 --keep-weekly=4 --keep-monthly=12 --keep-yearly=-1"
day: "*"
hour: 12 # default value = 1
minute: 0 # default value = 0
random_hour: 5 # default value : ignore randomization
random_minute: 59 # default value : ignore randomization
borgbackup_check_enabled: yes
borgbackup_check_jobs:
- name: system
check_options: "--lock-wait 28800"
day: 1
hour: 12 # default value = 1
minute: 0 # default value = 0
random_hour: 5 # default value : ignore randomization
random_minute: 59 # default value : ignore randomization
random_day: 27 # default value : ignore randomization

7
host_vars/fsdrnas Normal file
View File

@@ -0,0 +1,7 @@
inventory_hostname: fsdrnas.htu.tuwien.ac.at
inventory_hostname_short: fsdrnas
borgbackup_install_from_repo: True
borgbackup_binary: "/usr/bin/borg"
borgbackup_encryption_mode: "none"

View File

@@ -13,12 +13,14 @@ all:
zyklon:
laika:
progress:
fsdrnas:
fet_qemu:
hosts:
maria-storage:
buran:
nauka:
ruby:
fsdr:
fet_pi:
hosts:
baroness:

View File

@@ -64,6 +64,14 @@
roles:
- borg_client
- hosts: fsdr
roles:
- borg_client
- hosts: fsdrnas
roles:
- borg_server
- hosts: progress
roles:
- scans