Created
July 7, 2021 12:37
-
-
Save koma-xrd/5c9b4a83cbe0681bf8736ab52267cc94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#07072021: backups of the booted ssd to the non booted ssd | |
booteddisk=$(df /boot | grep -Eo '/dev/[a-z]*') | |
if [[ "$booteddisk"=="/dev/sdb" ]] | |
then | |
echo "booted from sdb - cloning to sda" | |
sudo rpi-clone sda -f -U | |
else | |
if [[ "$booteddisk"=="/dev/sda" ]] | |
then | |
echo "booted from sda - cloning to sdb" | |
sudo rpi-clone sdb -f -U | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment