aboutsummaryrefslogtreecommitdiff
path: root/systemd-zfs-partition-backup
diff options
context:
space:
mode:
Diffstat (limited to 'systemd-zfs-partition-backup')
-rw-r--r--systemd-zfs-partition-backup/AUR/PKGBUILD24
-rw-r--r--systemd-zfs-partition-backup/systemd/max-backup@.service7
-rw-r--r--systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules2
3 files changed, 33 insertions, 0 deletions
diff --git a/systemd-zfs-partition-backup/AUR/PKGBUILD b/systemd-zfs-partition-backup/AUR/PKGBUILD
new file mode 100644
index 0000000..f9d7315
--- /dev/null
+++ b/systemd-zfs-partition-backup/AUR/PKGBUILD
@@ -0,0 +1,24 @@
1# Maintainer: Max Christian Pohle <webmaster@coderonline.de>
2pkgname=systemd-zfs-partition-backup
3pkgver=2020_07_11
4# release number, always starts with 1
5pkgrel=1
6pkgdesc="automatically backup usb* drives to zfs datasets, encryption supported"
7arch=('any')
8url="http://git.entwicklerseite.de/zfs-auto-backup"
9license=('MIT')
10depends=(
11 'systemd'
12 'kbd'
13 'mkinitcpio'
14)
15source=("http://git.entwicklerseite.de/zfs-bash-tools/snapshot/zfs-bash-tools-master.tar.bz2")
16sha256sums=('a734c145709687c5621f430d3baec3105977984dfbb35348beab4b793aeb8e1b')
17
18package() {
19 install -D zfs-bash-tools-master/${pkgname}.sh ../pkg/${pkgname}/usr/bin/${pkgname}.sh
20 install -D zfs-bash-tools-master/${pkgname}/systemd/max-backup\@.service ../pkg/${pkgname}/usr/lib/systemd/system/${pkgname}.service
21 install -D zfs-bash-tools-master/${pkgname}/udev/rules.d/99-max-autobackup.rules ../pkg/${pkgname}/etc/udev/rules.d/99-${pkgname}.rules
22}
23
24# vim: ft=bash
diff --git a/systemd-zfs-partition-backup/systemd/max-backup@.service b/systemd-zfs-partition-backup/systemd/max-backup@.service
new file mode 100644
index 0000000..d7948a8
--- /dev/null
+++ b/systemd-zfs-partition-backup/systemd/max-backup@.service
@@ -0,0 +1,7 @@
1[Unit]
2Description=Generic backup
3
4[Service]
5Type=simple
6ExecStart=/usr/bin/systemd-zfs-partition-backup.sh %I
7
diff --git a/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules b/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules
new file mode 100644
index 0000000..e17bba0
--- /dev/null
+++ b/systemd-zfs-partition-backup/udev/rules.d/99-max-autobackup.rules
@@ -0,0 +1,2 @@
1ACTION=="add", ENV{ID_PART_ENTRY_NUMBER}=="[0-9]", ENV{SYSTEMD_WANTS}="max-backup@$env{ID_SERIAL}\\x2dpart$env{ID_PART_ENTRY_NUMBER}.service"
2LABEL="External disk drive backup"
..