Search | Member List | Calendar | Help
Current time: 09-07-2010, 09:19 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download Your Backups Automactically
05-21-2009, 09:42 AM
Post: #1
Download Your Backups Automactically
Hey everyone,

I have been searching for days trying to find a cost affordable way to create backups of our sites and clients on a weekly basis.
I have yet to find one that was what I consider affordable 30.00 or less that will work on my computer.
Needless to say one I found that is open source ( I LOVE OPEN SOURCE ) would take a rocket scientist to even run it.....way out of my league.

So I finally figured out I could make a script to do this for me as long as my system is on every week and download what I want it to.
Still does not do cpanel backups but I will post the scripts here for those of you who wishes to use them to save you time.

I am sure most people already know how to do this and Tongue SHAME Tongue on you for not sharing this needful information to those of us who do not. Joke Big Grin

If anyone knows how to make cpanel create automatic full site backups every week please let me know.

GBU Big Grin
Ellen
Find all posts by this user
Quote this message in a reply
05-21-2009, 09:50 AM
Post: #2
ACE FTP Backups
I have tested this script to use with ACEFTP to do weekly full site backups

Script downloads the entire site: I made and tested it WORKS:

Code:
ChangeToFolderR(yoursite.com/fiction/)
ChangeToFolderL(C:\perso\teststorage)
CopyToLeft(*)

Link to tutorial for aceftp:
Code:
http://software.visicommedia.com/en/products/aceftp/support/scheduler.html
Find all posts by this user
Quote this message in a reply
06-02-2009, 10:57 AM
Post: #3
Re: Download Your Backups Automactically
Hi Heres one if you want to have your backups made then sent by ftp to a server some place or if you want setup iss on your pc and ftp and send them to your pc for that optition to work you really need a static ip address on your DSL

This backup script includes SSL support. This isn't necessary if you run the script on the server for which you're generating the backup; but the SSL support is very important if you're running the script somewhere else to connect to your cPanel hosting account.

Code:
<?php

// PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server.
// This script contains passwords. KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir, not /www/)

// ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED *********

// Info required for cPanel access
$cpuser = "username"; // Username used to login to CPanel
$cppass = "password"; // Password used to login to CPanel
$domain = "example.com"; // Domain name where CPanel is run
$skin = "x"; // Set to cPanel skin you use (script won't work if it doesn't match). Most people run the default x theme

// Info required for FTP host
$ftpuser = "ftpusername"; // Username for FTP account
$ftppass = "ftppassword"; // Password for FTP account
$ftphost = "ftp.example.com"; // Full hostname or IP address for FTP host
$ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)

// Notification information
$notifyemail = "you@example.com"; // Email address to send results

// Secure or non-secure mode
$secure = 0; // Set to 1 for SSL (requires SSL support), otherwise will use standard HTTP

// Set to 1 to have web page result appear in your cron log
$debug = 0;

// *********** NO CONFIGURATION ITEMS 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 connectionÂ… Bailing out!\n"; exit; }

// Encode authentication string
$authstr = $cpuser.":".$cppass;
$pass = base64_encode($authstr);

$params = "dest=$ftpmode&email=$notifyemail&server=$ftphost&user=$ftpuser&pass=$ftppass&submit=Generate Backup";

// 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);

?>

Not to long and it works well I do not support the script just thought i would post it is all....

Rick

The future of tomorrow today. ©2004 - 2009
Visit this user's website Find all posts by this user
Quote this message in a reply
11-09-2009, 06:02 AM
Post: #4
RE: Download Your Backups Automactically
here is a free download of a script that will let you do tons of stuff for backups and its free PHP SCRIPT HERE

Rick

The future of tomorrow today. ©2004 - 2009
Visit this user's website Find all posts by this user
Quote this message in a reply
01-25-2010, 02:38 PM
Post: #5
RE: Download Your Backups Automactically
Hi Rick,

Thank You very much for your posts I am checking the last one out now.

Blessings,
Ellen
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: