9

Linux Backup Bash

view full story
linux-howto

http://stackoverflow.com – I am trying to create a bash script that backup the whole /dev/sda1 to /mnt/Backup /dev/sda1 457G 3.5G 431G 1% / /dev/sdb1 2.8T 3.0G 2.8T 1% /mnt/Backup The script that have is : START=$(date +%D) FOLDER_NAME=`echo $START | tr -s '/' | tr '/' '_'` SOURCE_PATH='/media /bin /boot /cdrom /dev /etc /home /lib /opt /proc /root /run /sbin /selinux /srv /sys /tmp /usr /var' SOURCE_PATH='/' FOLDER_PATH='/mnt/Backup' BACKUP_PATH=$FOLDER_PATH/Bkp_$FOLDER_NAME mkdir -p '$BACKUP_PATH' cp -r $SOURCE_PATH $BACKUP_PATH As you can see above on the source path i have tried naming all (HowTos)