Administración > Base de Conocimientos - FAQs > Depto. Tecnico > Panel de Control CPANEL > Respaldo ( Backup ) Completo desde Cpanel
Respaldo completo en cpanel
Â
Â
Mediante el siguiente script ud podra automatizar la tarea de respaldo (backup) de su cuenta de hosting.
Tenga en cuenta que siempre puede realizar un backup de su cuenta de hosting en forma manual siguiente el siguiente tutorial: http://www.atlanticadigital.net/clientes/knowledgebase/135/Como-hacer-back-ups-de-mis-sitios.html
PHP Script
// Info required for cPanel access
$cpuser = "username";
$cppass = "password";
$domain = "example.com";
$skin = "x3";
// Notification information
$notifyemail = "you@example.com";
// Secure or non-secure mode
$secure = 0;
// Set to 1 to have web page result appear in your cron log
$debug = 0;
// ** NO EDIT BELOW THIS LINE ***
if ($secure) {
$url = "ssl://".$domain;
$port = 2083;
} else {
$url = $domain;
$port = 2082;
}
$socket = fsockopen($url,$port);
if (!$socket) {
echo "Failed to open socket connectionu Bailing out!\n"; exit;
}
// Encode authentication string
$authstr = $cpuser.":".$cppass;
$pass = base64_encode($authstr);
$params = "dest=homedir&email=$notifyemail&server=&user=&pass=&port=&rdir=";
// Make POST to cPanel
fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0\r\n");
fputs($socket,"Host: $domain\r\n");
fputs($socket,"Authorization: Basic $pass\r\n");
fputs($socket,"Connection: Close\r\n");
fputs($socket,"\r\n");
// Grab response even if we don't do anything with it.
while (!feof($socket)) {
$response = fgets($socket,4096);
if ($debug) echo $response;
}
fclose($socket);
?>Cron jobs
Para tener un respaldo cada 15 dias guarda el script de arriba como fullbackup.php y configura el cron en la herramienta de administracion de cpanel como se muestra a continuacion:
Agregar a Favoritos
Imprimir éste ArtÃculo