Added WIP nextcloud playbook
This commit is contained in:
@ -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!"
|
||||
|
1
templates/disk-power.rules
Normal file
1
templates/disk-power.rules
Normal file
@ -0,0 +1 @@
|
||||
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", RUN+="/sbin/hdparm -B 127 -S 60 $env{DEVNAME}"
|
7
templates/io-scheduler.j2
Normal file
7
templates/io-scheduler.j2
Normal 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 }}"
|
Reference in New Issue
Block a user