Added WIP nextcloud playbook

This commit is contained in:
2024-02-12 19:48:45 +01:00
parent 5ccc9709d8
commit 239332bafb
7 changed files with 1070 additions and 7 deletions

View File

@ -1,11 +1,11 @@
#!/bin/bash
# Borg repo location
REPOSITORY={{borg_repo_path}}
REPOSITORY={{ borg_repo_path }}
echo "`date +[%F/%T]` Starting the backup"
# Create backup
borg create -v --compression {{borg_backup_compression}} --stats $REPOSITORY::{{borg_backup_name_format}} {{borg_backup_paths}} {{borg_exclude_paths}}
borg create -v --compression {{ borg_backup_compression }} --stats $REPOSITORY::{{ borg_backup_name_format }} {{ borg_backup_paths }} {{ borg_exclude_paths }}
# Clean old backups
borg prune -v $REPOSITORY --keep-daily=3 --keep-weekly=2 --keep-monthly=12
echo "`date +[%F/%T]` Done!"

View File

@ -0,0 +1 @@
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/sbin/hdparm -B 127 -S 60 $env{DEVNAME}"

View File

@ -0,0 +1,7 @@
# set scheduler for NVMe
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="{{ iosched_nvme }}"
# set scheduler for SSD and eMMC
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="{{ iosched_ssd }}"
ACTION=="add|change", KERNEL=="mmcblk[0-9]*", ATTR{queue/scheduler}="{{ iosched_mmc }}"
# set scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="{{ iosched_hdd }}"