diff options
Diffstat (limited to 'incremental-complete-backup')
-rw-r--r-- | incremental-complete-backup/backup-tool.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/incremental-complete-backup/backup-tool.sh b/incremental-complete-backup/backup-tool.sh index 3ab213d..3788407 100644 --- a/incremental-complete-backup/backup-tool.sh +++ b/incremental-complete-backup/backup-tool.sh @@ -123,11 +123,11 @@ fi fi } # ------------------------------------------------------------# -# formatExternalmedia() unmount the mounted partitions, create# -# new partition table format 1st partition to vfat, # +# formatforIncremental() unmount the mounted partitions, # +# create new partition table format 1st partition to vfat, # # 2nd to ext4 and mount under /mnt # # ------------------------------------------------------------# -formatExternalmedia() { +formatforIncremental() { umount /media/$USER/* echo $password |sudo -S mkdir -p /mnt/boot /mnt/rootfs echo -e "o\nn\np\n1\n\n+100M\nn\np\n2\n\n\nw"|sudo fdisk /dev/$dev_name # delete old partition table and creating new @@ -137,13 +137,13 @@ sudo mount /dev/$dev_name*1 /mnt/boot sudo mount /dev/$dev_name*2 /mnt/rootfs } # ------------------------------------------------------------# -# formattofat() unmount the mounted partitions, create # +# formatforComplete() unmount the mounted partitions, create # # new partition table format 1st partition to vfat, # # # # ------------------------------------------------------------# -formattofat() { +formatforComplete() { umount /media/$USER/* -echo $password |sudo -S mkdir -p /mnt/boot +echo $password |sudo -S mkdir -p /mnt/boot echo -e "o\nn\np\n1\n\n\nw"|sudo fdisk /dev/$dev_name # delete old partition table and creating new sudo mkfs.vfat /dev/$dev_name*1 sudo mount -t vfat /dev/$dev_name*1 /mnt/boot -o rw,uid=1000,gid=1000 @@ -181,7 +181,7 @@ case "${result}" in ;; "2" ) # "new incremental backup" start new rsync cat /sys/class/net/eth0/address > /opt/.Hw_addr.txt # storing mac_id b4 copy - formatExternalmedia + formatforIncremental echo $rootfs_path sudo rsync -latgrzpo --exclude='/tmp' --exclude='/dev' --exclude='/proc' --exclude='/sys' /opt /mnt/rootfs/ sync @@ -191,7 +191,7 @@ case "${result}" in esac ;; "2" ) # Complete - formattofat + formatforComplete sudo rsync -latgrzpo /opt/fossee-os/* /mnt/boot/ #rm -f /etc/udev/rules.d/70-persistent-net.rules sudo tar -cpzf /mnt/boot/fossee-os.tar --one-file-system / |