Bash Script Problem!!
by yeuthehinh1 from LinuxQuestions.org on (#5MJ03)
I have cron run a weekly backup script. For years it ran without problem, but maybe a year or two ago the script would not umount when the backup completed. I want it to do so. The scripts starts and ends:
#!/bin/bash
mount /mnt/backup &
sleep 2s
...
sleep 4
cd ../..
umount /mnt/backup &
After the backup the mount command shows: /dev/sdd1 on /mnt/backup type ext4 (rw,nosuid,nodev,relatime,user)
#!/bin/bash
mount /mnt/backup &
sleep 2s
...
sleep 4
cd ../..
umount /mnt/backup &
After the backup the mount command shows: /dev/sdd1 on /mnt/backup type ext4 (rw,nosuid,nodev,relatime,user)