How to use rsync with a different port?


i am trying to figure out how to backup my box with rsync but with a different port.
i have tried to modify the[1], but that gives me this error when setting up rsync in the web interface:

I changed in line 19 [2] “-p 22” to “-p 2222”.

Any ideas on how to get it working?
Thanks for your time!

[2] “–rsync-options=-e “/usr/bin/ssh -oStrictHostKeyChecking=no -oBatchMode=yes -p 22 -i /root/.ssh/id_rsa_miab””,


This question has been asked but never answered. … see this thread for my solution to the problem which may or may not be practical for you.


Thank you for your answer!
I am already doing it like this. :slight_smile:
Maybe this should be more a feature request than a maintenance question. I think it choosing a port for the rsync backup can be useful for a lot of people who want to backup their Mail-in-a-Box to a home computer.


You can push the rsync output to your NAS easily. I am using at home the WD My Cloud Ex2 NAS and the SSH is listening on a different port than the 22. So AFTER opening the 2233 port at the firewall of my router, I’m doing this:

rsync -a -e “ssh -p 2233” /home/user-data/backups/encrypted/

Don’t forget the encryption key!

You may need to delete the local backup though after the transfer, but this might be a good example for a different cronjob entry.



i don’t know if this helps but you could just create a ssh config file for the root user on your miab.


Host hostnameof.your.bkpserver
    Port 2345

this way the rsync job will automatically use the desired port (no need to hack scripts).


Hello everyone
How can i use resync back up ?
tell me .
best regards
Writer at best dissertation help in UK.


This is the perfect way that will make us able to have best solutions from dissertation writing services, using this specified port.


Hello everyone
How can I use resync back up?
tell me.
Best regards
Best institute for cyber security course and VAPT in India.