What commands does cpanel run, over SSH, to do rsync backups ?

rcpuser

Registered
May 5, 2020
3
0
1
California
cPanel Access Level
Website Owner
cpanel allows you to do backups with rsync-over-ssh - this is the rsync backup function that I am talking about:



However, when you run an rsync backup from cpanel, it does more than just run rsync over SSH - it runs some commands on the "Remote Host" - probably 'ls' or 'mkdir' or 'cp' or ... something ?

I need to know what commands cpanel runs over SSH when it does an rsync backup because I need to know what commands to whitelist, or allow, in a restricted environment. So, can someone tell me what cpanel runs over SSH when you do an rsync backup ?

Thank you.
 
Last edited by a moderator:

rcpuser

Registered
May 5, 2020
3
0
1
California
cPanel Access Level
Website Owner
I see that the forum removed the URL I put that was a picture of the cpanel entry page to configure an rsync backup ...

Since I can't show you that screenshot, it is just the rsync backup page that asks for things like:

"Destination name", "backup directory", "remote host" .... "port" ... "remote account username"

Just the normal stuff you'd need to configure a backup over SSH.

The question is, what ELSE does cpanel run over ssh than just rsync itself ? It is running some commands, but I don't know what commands to allow on the remote host...
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
You can attach screenshots but we don't allow 3rd party links as I noted to you when I removed it. The forums rules are clear on this and you can view them here: Forums Guidelines and FAQ

The specific Perl Modules that manage this can be found here:
/usr/local/cpanel/Cpanel/Transport/Files.pm
/usr/local/cpanel/Cpanel/Transport/Response.pm
/usr/local/cpanel/Cpanel/Transport/Files/Rsync.pm


And in general /usr/local/cpanel/Cpanel/Transport/Files/
 

rcpuser

Registered
May 5, 2020
3
0
1
California
cPanel Access Level
Website Owner
Thanks!

So, just to clarify, are you saying that if I inspect those perl modules I will find the remote unix commands that cpanel tries to run ?

Or does the *remote host* need to have perl installed on it ? Does cpanel call perl over ssh on the remote host ?

Thanks.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,252
313
Houston
The remote host doesn't need it those Perl modules are what handles the transport. If you need to know what commands are run specifically that would be where you would find them.