Dofullbackup.html Call from Perl No Longer Working


Apr 16, 2004
I'm a user with a reseller account on a typical web hosting provider. My provider recently moved my account to a new server with Cpanel 11.42.1 installed. For years, I have been doing my own accounts backups to a remote server using Cpanel dofullbackup from a Perl script running on cron nightly. I have the cron job do a backup of one account per night. Since the move to the new server, dofullbackup doesn't seem to run. I use the following code snippet:

	$authstr = "$account:$passwd";
	$cPanelUidPass = encode_base64($authstr);

# Get the port address

	$iaddr = inet_aton($whmServer);
	$paddr = sockaddr_in($whmPortNumber , $iaddr);

# Create the socket, connect to the port

	socket(SOCKET, PF_INET, SOCK_STREAM, 0) or die "Socket failed for client account: $account[$i]: $!";
	connect(SOCKET, $paddr) or die "Connect failed for client account: $account[$i]: $!";
	autoflush SOCKET (1);

# Request dofullbackup of account

  $params = "?dest=$remote_dest&email=$email&server=$server&user=$user&pass=$pass&port=$port&rdir=$rdir";
	print SOCKET "GET /frontend/x3/backup/dofullbackup.html$params\r\n";
	print SOCKET "HTTPS/1.0\r\n";
  print SOCKET "Host: $domain \r\n");
	print SOCKET "Authorization: Basic $cPanelUidPass \r\n";
	print SOCKET "Accept: text/html; */*\n";
	print SOCKET "Connection: close\r\n\r\n";
I can kickoff the process

When I run my script with some write statements, this is what I see:

>> Remote Backup Begun at 20:14:01 on May 12 2014 <<
--- Processing client account 1: jrnhosti 
--- authstr: username:xxxxxxxx 
--- domain: 
--- cPanelUidPass: anJuaG9zdGk6bGVlbmllLTE= 
>> Backup Started at 20:14:01 on May 12 2014 <<
--- GET
/frontend/x3/backup/dofullbackup.html?dest=passiveftp&[email protected]&
--- HTTPS/1.0 
--- Host: 
--- Authorization: Basic anJuaG9zdGk6bGVlbmllLTE=
--- Accept: text/html; */*
--- Connection: close
>> Backup Ended at 20:14:01 on May 12 2014 <<
>> Remote Backup Completed at 20:15:31 on May 12 2014 <<
Everythiing looks ok, but the dofullbackup just doesn't seem to execute. I've also tried running as POST. Is there something new in releaser 11.42.1 that would account for dofullbackup not running?
Last edited by a moderator:


Apr 16, 2004
Thanks for the lead. I tried using one of the scripts shown using the and got similar results, but at least some detail to what the problem might be, although I don't know how to resolve it. The results returned using the debug option are below. I'm assuming my web hosting provider changed something when they moved my sites to the new server. Can anyone point to what might have changed from the messages below that I can have my provider look into?

debug: Using user param from object creation
debug: Using pass param from object creation
debug: loaded serializer: JSON::Syck
debug: api_request: ( cPanel::PublicAPI=HASH(0x15f8f80), cpanel, /xml-api/cpanel, POST, HASH(0x15f8ef0),  )
debug: failed to load encoder: cPanel/CPAN/URI/
debug: loaded encoder: URI/
debug: Found port for service cpanel to be 2082 (usessl=0)
debug: POST /xml-api/cpanel HTTP/1.1
Connection: Close
Content-Length: 238
User-Agent: cPanel::PublicAPI (perl) 1.002
Authorization: Basic anJuaG9zdGk6bGVlbmllLTE=

[email protected]
debug: HTTP LINE[HTTP/1.1 403 Forbidden Access denied
debug: HEADER[content-type]=[text/xml]
debug: HEADER[connection]=[close]
debug: HEADER[server]=[cpsrvd/]
debug: READ TYPE=close
Server Error from HTTP/1.1 403 Forbidden Access denied
Last edited:


Staff member
Apr 11, 2011
It looks like you have asked that question on the other thread, so I will leave it to be answered there.

Thank you.