rsync: [Receiver] mkdir "/mnt/raid" failed: Permission denied (13)

1. Make sure that the permissions are correct on the target host (root@bkp-fivemin) 2. Make sure that the folder you are targeting exists before running rsync 3. Alternatively copy the folder you want to folder to a…

1. Make sure that the permissions are correct on the target host (root@bkp-fivemin)

2. Make sure that the folder you are targeting exists before running rsync

3. Alternatively copy the folder you want to folder to a seperate location and chown to to a user on the remote (that users has to be created first)

[root@fivemin /]# mkdir /root/etc-temp && cd /etc
[root@fivemin etc]# cp -r ./ /root/etc-temp 
[root@fivemin etc]# ssh testuser@bkp-fivemin
[testuser@bkp-fivemin /]# whoami
testuser
[testuser@bkp-fivemin /]# exit
[root@fivemin /]# adduser testuser
[root@fivemin /]# chown testuser:testuser /root/etc/
[root@fivemin etc]# rsync -rh --progress ./etc/ root@bkp-fivemin:/mnt/bkp
EXAMPLE: Alternatively copy the folder you want to folder to a seperate location and chown to to a user on the remote (that users has to be created first)

The error

[root@fivemin etc]# rsync -rh --progress ./etc/ root@bkp-fivemin:/mnt/bkp
root@fivemin's password: 
sending incremental file list
rsync: [Receiver] mkdir "/mnt/bkp/" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(787) [Receiver=3.2.3]