Compare commits

..

2 Commits

Author SHA1 Message Date
stupidcomputer b1c87c3b86 add do_backup 2024-09-09 01:07:13 -05:00
stupidcomputer 2be886d132 add git-annex to copernicus 2024-09-09 01:07:06 -05:00
2 changed files with 24 additions and 0 deletions

View File

@ -47,6 +47,7 @@
libnotify libnotify
ffmpeg ffmpeg
mdadm mdadm
git-annex
(pkgs.callPackage ../../builds/archutils.nix {}) (pkgs.callPackage ../../builds/archutils.nix {})
]; ];

23
builds/utils/do_backup Executable file
View File

@ -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"