When I run the executable script
Script “backup.file.sh”
#!/bin/sh # starts
A shell script to backup an updated “a.file” from the
/home/user/project directory on the hard disk to the
/project directory on a flash drive as an exact
“a.file” copy.
The updated “a.file” will then be backed up to
another /project directory on a second flash drive,
to a /project directory on an external hard disk, and last
to a /project directory on a Windows Vista NTFS hard disk.
rsync [options] from local SOURCE …to… local DESTINATION
[options are] progress, archive, verbose, preserve Hard links
rsync -P -a -v -H /home/stephen/project/a.file /dev/sdc1 /media/usb 1/project # the first backup operation for the “a.file”
reminder chmod 755 backup.file.sh [convert to executable]
reminder [run] ./backup.file.sh
I receive the following error message:
sending incremental file list
rsync: link_stat “/media/usb” failed: No such file or directory (2)
rsync: mkdir “/home/stephen/1/project” failed: No such file or directory (2)
rsync error: error in file IO (code 11) at main.c(576) [receiver=3.0.4]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(632) [sender=3.0.4]
I ran the df command and the filesystem “/dev/sdc1” is mounted on “/media/usb 1”. When I ran the mount command it writes onscreen
/dev/sdc1 on /media/usb 1 type vfat (rw,nosuid,nodev,shortname=lower,flush,utf8,uid=1000)
The flash drive “usb 1” also has a /project directory. However, an error occurs that I have tried hard to solve.