Skip to content

Instantly share code, notes, and snippets.

@gbrks
gbrks / btrfs-scrub
Last active September 10, 2021 21:39
btrfs scrub: script and systemd timers to run monthly
#! /bin/bash
#######################################################
# This is a helper script to be used in a systemd timer
# or cron job to scrub all mounted btrfs filessytems
#
# $Author: gbrks
# $Revision 0.1
# $Date: 2015.05.15
#
# Update email address below
@gbrks
gbrks / snapraid-sync
Last active July 3, 2023 15:37
SnapRAID sync and scrub: script and systemd timers to run nightly
#! /bin/bash
#######################################################################
# this is a helper script that keeps SnapRAID parity info in sync with
# your data. Here's how it works:
# 1) it first calls diff to figure out if the parity info is out of sync
# 2) if there are changed files (i.e. new, changed, moved or removed),
# it then checks how many files were removed.
# 3) if the deleted files exceed X (configurable), it triggers an
# alert email and stops. (in case of accidental deletions)
# 4) otherwise, it will call sync.
plugins: fetchart embedart scrub lastgenre missing
directory: /music/
library: /config/musiclibrary.blb
art_filename: cover
threaded: yes
original_date: no
per_disc_numbering: no
ui:
color: yes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
OpenPGP Key Transition Statement
Gavin Brooks <gavinjbrooks@gmail.com>
Mon Dec 21 13:41:40 UTC 2015
For a number of reasons, I've recently set up a new OpenPGP key, and
will be transitioning away from my old one.

Keybase proof

I hereby claim:

  • I am gbrks on github.
  • I am gbrks (https://keybase.io/gbrks) on keybase.
  • I have a public key whose fingerprint is 4B86 FB53 816F 416D F8B6 7AB0 B6E8 4081 1988 7BC2

To claim this, I am signing this object: