This commit is contained in:
Your Name 2024-09-01 21:58:03 +00:00
parent d9df20117e
commit 09e9d5d674

View File

@ -149,37 +149,7 @@ homeBackup() {
osBackup() { osBackup() {
umount $TARGET umount $TARGET
if [[ $FULL_DISK_ENCRYPTION = *True* ]]; then osSnapshots "$1" "$2"
printf "$DISK_PASSWORD" | cryptsetup open ${BTRFS} $ROOT_MAPPER_NAME
fi
if [[ -e "$ROOT_MAPPER_NAME" ]]; then
echo
echo "[Mounting.....]"
echo
mount -o $COMPRESSION $ROOT_MAPPER_NAME $TARGET
if [[ -e "$TARGET/@$ROOT_NAME/usr/bin/bash" ]]; then
if [ "$1" = "home" ]; then
homeBackup
fi
osSnapshots "$1" "$2" "$3"
else
echo
echo "Aborting Install, $TARGET/@$ROOT_MAPPER_NAME/usr/bin/bash not found!"
echo
echo
exit 1
fi
else
echo
echo "Aborting Install, $ROOT_MAPPER_NAME not found!"
echo
echo
exit 1
fi
ls $TARGET/ ls $TARGET/
umount $TARGET umount $TARGET
@ -810,15 +780,8 @@ menu() {
clear clear
echo "[Backup OS]" echo "[Backup OS]"
echo echo
read -p 'Backup Home Directory? : ' -e -i 'n' home_backup read -p 'OS Backup Directory Location : ' -e -i "/tmp" backup_directory
read -p 'OS Backup Directory Location : ' -e -i "/mnt" backup_directory osBackup $backup_directory "$ROOT_NAME"
if [[ $home_backup = *n* ]]; then
setDevices
osBackup "none" "$backup_directory" "$ROOT_NAME"
else
setDevices
osBackup "home" "$backup_directory" "$ROOT_NAME"
fi
elif [[ $choice = 6 ]]; then elif [[ $choice = 6 ]]; then
clear clear
echo "[Restore from Backup]" echo "[Restore from Backup]"