#MASK
echo "============================================================"
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "============================================================"
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
done
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you did not have enter nothing for 2x times"
exit
else
if [ “$MENU” = “6” ]
then
exit
else
if [ “$MENU” = “1” ]
then
echo "List Home Directory"
echo ""
echo ""
echo "==========================================================="
ls -ali /home/die7/
echo ""
echo ""
echo “============================================================”
echo "==========================================================="
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "==========================================================="
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you didi not heve enter nothing for 2x times"
exit
else
if [ “$MENU” = “2” ]
then
clear
echo " Backup of Home Directory"
echo ""
echo ""
echo "=============================================================="
echo ""
tar -czvf /tmp/backup_homes/backup_home.tar.gz /home/die7/
echo ""
echo ""
echo “”
echo “Backup done!”
echo "=============================================================="
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "==============================================================="
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
done
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you didi not heve enter nothing for 2x times"
exit
else
if [ “$MENU” = “3” ]
then
clear
echo "List Backup Sets"
echo ""
echo ""
echo "==================================================================="
ls /tmp/backup_homes/
echo ""
echo ""
echo ""
echo “”
echo “List of Backup Sets done!”
echo "=================================================================="
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "=================================================================="
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
done
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you didi not heve enter nothing for 2x times"
exit
else
if [ “$MENU” = “4” ]
then
clear
echo "Recovery of Home Directory"
echo ""
echo ""
echo "======================================================================="
tar -xzvf /tmp/backup_homes/backup_home.tar.gz -C /
echo ""
echo ""
echo “======================================================================”
echo "Recover of Home Directory done"
echo "======================================================================"
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "======================================================================"
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
done
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you didi not heve enter nothing for 2x times"
exit
else
if [ “$MENU” = “5” ]
then
clear
echo "Del Backup set"
echo ""
echo ""
echo "=============================================================================="
rm -rf /tmp/backup_homes/backup_home.tar.gz
echo ""
echo “”
echo "Deletion fo Backup Sets done!"
echo "======================================================================"
echo " 1 - List Home Dir"
echo " 2 - Backup Home Dir"
echo " 3 - List Backup sets"
echo " 4 - Recovery Home"
echo " 5 - Deletion of Backup set"
echo " 6 - Quit"
echo "======================================================================"
echo -e " Please enter one of the option --> \c"
read MENU
until [ “$MENU” -le “6” ]
do
echo -e " Please enter one of the option --> \c"
read MENU
done
if [ -z “$MENU” ]
then
echo " Please enter one of the option"
echo -e " Please enter one of the option --> \c"
read MENU
echo "Program will be closed since you didi not heve enter nothing for 2x times"
exit
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi