From b1c87c3b86d312294faddbc5585cd866b21759fc Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Mon, 9 Sep 2024 01:07:13 -0500 Subject: [PATCH] add do_backup --- builds/utils/do_backup | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 builds/utils/do_backup diff --git a/builds/utils/do_backup b/builds/utils/do_backup new file mode 100755 index 0000000..a316c18 --- /dev/null +++ b/builds/utils/do_backup @@ -0,0 +1,23 @@ +#!/bin/sh + +# check for the disks +if [ "$(lsusb | grep -c 152d:1561)" -ne 1 ]; then + printf "is the disk drive connected?\n" + exit 1 +fi + +if [ "$(lsblk | grep -Ec '^sdb|^sdc')" -ne 2 ]; then + printf "are the disk drives available\n" + exit 1 +fi + +mount_raid_array + +cd ~/mount/annex +git annex sync +git annex get . +cd /tmp + +mount_raid_array umount + +printf "done\n"