Cannot get rsync script to backup files to USB
by coderlen from LinuxQuestions.org on (#56Q7Y)
I have an rsync script which I use to backup my files to USB. Here is what the script looks like:
Code:len@len-satellitee45ta:~/Backup$ cat rsyncDriveFUSBBackup2.sh
rsync -avtu --modify-window=2 --exclude={'*.iso','Downloads','Desktop'} /home/len/* "/media/len/DRIVE F"
rsync -avtu --modify-window=2 /home/len/Documents "/media/len/DRIVE F"When I execute this script, this is the error message:
Code:len@len-satellitee45ta:~/Backup$ ./rsyncDriveFUSBBackup2.sh
sending incremental file list
rsync: [Receiver] mkdir "/media/len/DRIVE F" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(758) [Receiver=3.2.2]
sending incremental file list
rsync: [generator] recv_generator: mkdir "/media/len/DRIVE F" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
Documents/
sent 71 bytes received 174 bytes 490.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1287) [sender=3.2.2]Here is the lsblk output:
Code:len@len-satellitee45ta:~/Backup$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55M 1 loop /snap/core18/1880
loop1 7:1 0 309.8M 1 loop /snap/flightgear/36
loop2 7:2 0 29.9M 1 loop /snap/snapd/8542
loop3 7:3 0 55.3M 1 loop /snap/core18/1885
sda 8:0 0 931.5G 0 disk
sda1 8:1 0 450M 0 part
sda2 8:2 0 100M 0 part
sda3 8:3 0 16M 0 part
sda4 8:4 0 465.5G 0 part
sda5 8:5 0 570M 0 part
sda6 8:6 0 1G 0 part
sda7 8:7 0 48.8G 0 part /media/len/rootantiX19
sda8 8:8 0 9.3G 0 part [SWAP]
sda9 8:9 0 57.5G 0 part /
sda10 8:10 0 1.1G 0 part
sda11 8:11 0 53.7G 0 part
sda12 8:12 0 4.2G 0 part
sda13 8:13 0 46.6G 0 part
sdb 8:16 0 29.8G 0 disk
sdc 8:32 1 29.8G 0 disk
sdc1 8:33 1 29.8G 0 partAttached is the screenshot of the file manager listing of DRIVE F.
I am operating in SparkyLinux. Screenshot also attached.
I cannot imagine what I am doing wrong. But surely you all can help. Thanks.
Attached Thumbnails


Code:len@len-satellitee45ta:~/Backup$ cat rsyncDriveFUSBBackup2.sh
rsync -avtu --modify-window=2 --exclude={'*.iso','Downloads','Desktop'} /home/len/* "/media/len/DRIVE F"
rsync -avtu --modify-window=2 /home/len/Documents "/media/len/DRIVE F"When I execute this script, this is the error message:
Code:len@len-satellitee45ta:~/Backup$ ./rsyncDriveFUSBBackup2.sh
sending incremental file list
rsync: [Receiver] mkdir "/media/len/DRIVE F" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(758) [Receiver=3.2.2]
sending incremental file list
rsync: [generator] recv_generator: mkdir "/media/len/DRIVE F" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
Documents/
sent 71 bytes received 174 bytes 490.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1287) [sender=3.2.2]Here is the lsblk output:
Code:len@len-satellitee45ta:~/Backup$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55M 1 loop /snap/core18/1880
loop1 7:1 0 309.8M 1 loop /snap/flightgear/36
loop2 7:2 0 29.9M 1 loop /snap/snapd/8542
loop3 7:3 0 55.3M 1 loop /snap/core18/1885
sda 8:0 0 931.5G 0 disk
sda1 8:1 0 450M 0 part
sda2 8:2 0 100M 0 part
sda3 8:3 0 16M 0 part
sda4 8:4 0 465.5G 0 part
sda5 8:5 0 570M 0 part
sda6 8:6 0 1G 0 part
sda7 8:7 0 48.8G 0 part /media/len/rootantiX19
sda8 8:8 0 9.3G 0 part [SWAP]
sda9 8:9 0 57.5G 0 part /
sda10 8:10 0 1.1G 0 part
sda11 8:11 0 53.7G 0 part
sda12 8:12 0 4.2G 0 part
sda13 8:13 0 46.6G 0 part
sdb 8:16 0 29.8G 0 disk
sdc 8:32 1 29.8G 0 disk
sdc1 8:33 1 29.8G 0 partAttached is the screenshot of the file manager listing of DRIVE F.
I am operating in SparkyLinux. Screenshot also attached.
I cannot imagine what I am doing wrong. But surely you all can help. Thanks.
Attached Thumbnails