Anyone know of a good SSH program that I could setup to automatically connect to my servers at a set time 'such as once a day' to download my server backup folder?
Anyone know of a good SSH program that I could setup to automatically connect to my servers at a set time 'such as once a day' to download my server backup folder?










I'm currently doing backups manually.mg:
Could some enterprising young individual who is automating their website/database backups please write a nifty tutorial for noobs like me who don't even know where to begin?
It would be nice to automate the whole process and get my ass covered automatically.![]()
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
I'm trying to be lazy myself
What do you have cpanel reseller, whm ?
I can setup my whm to make backups to ftp to a different server, right now I just have it making them on the harddrive but if the hd fails there goes the backup along with the sites. Would like to automatically download them nightly, or at least weekly.










I read somewhere a while back a way of doing it with three cron jobs.
Setup a cron job on the main server to make a backup every so often then move it to a public location.
On the back up server setup a cron job to grab the backup
Back on the main server set a cron to delete the public backup an hour or so later.
I toyed with doing it this way but I didn't want my backups to be public for any amount of time.
How about windows task schedule.. Set it to automatically run an FTP client at 3am or so.. If you can configure the FTP client to automatically connect and grab the file you're all set.
rsnapshot.org and rsnapshotDB










I have 3 reseller accounts with WHM/cPanel etc.
I also have 4 computer systems at home that are on 24/7, so I guess I'd need to create files on the web servers on a schedule and then get some software for home that could connect, download and disconnect automatically.
It's just trying to work everything out that's giving me a headache.
I don't know how to automate backups (reliably) on the web server and I need to locate some software for my workstation at home.
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
A few interesting ideas in here thank you
Download a few programs, did some reading and have though of something. How about setting up a virtual ftp server on your 'my' home network. The whm allows the backup to be sent to an ftp server, this would cause it to be directly sent to the ftp server on the home network.
Now the question is what program to use, and if my main server at home will work or to setup a linux box or net appliance for the job!










I don't have access to the server. So, I can't install software.
But, if I can setup a backup in WHM and have it FTP to somewhere, then I'm all set!
I already have an FTP server in use at home with the port forwarded through my firewall.
I just have to add a user for the backup connection and assign permissions to it.
WooHoo!! Now, I just have to figure out the webserver half of it and I'm done.
Thanks Grim. (Can it be done by site in cPanel? Or does it have to be in WHM?)
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
It depends if your host gave you the permission / option. You might beable to ask.
My one reseller account I have does not give me the option, my VPS and dedicateds however do.
This lets me setup full backups, I can make the backup on the server or set it up to transfer to a remote server. I can also set it daily, weekly, etcBackup
Configuration File Rollback
Configure Backup
Restore Backups
Restore Multiple Backups
Restore a Full Backup/cpmove file
I'm trying something right now though that should work for you on a standard hosting account. WS_FTP Pro has a nice automatic backup and synch capability built in! I setup a scheduled task and it's working ATM, backing up and synching my new VPS account!
God am I lazy, if this works it will rock!
BTW it's WHM that I have that option.
What do you use for your in home ftp server? Software?....
Last edited by grim; Nov 16th, 2006 at 1:41 pm.










HA HA HA! Great minds think alike, but different.
I have been playing with the Backup function in cPanel on one of my websites.
I have been able to get it to make a full backup of everything, tar.gz the file and FTP it directly to it's own folder on my FTP server. It worked! The only problem is that it is still a manual process. If I can figure out the command that was used to do all that and cron it, I am home free!!!
My FTP server at home is running Windows 2000 Server with the native FTP server installed.
I also have a free account at dyndns.org so I can have a static DNS name on my home IP.
Windows XP Pro (I don't know about Home Edition) is actually enough to run an FTP server on...
Start > Control Panel > Add/Remove Programs > Windows Components > Internet Information Services > Details button > FTP Service
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
I changed my backups over to compression as well nowI was hoping to save some bandwidth and power by only backing up what needed to be, but the compressed is going to be easier.
Chron job would be nice as hexx...
I still may end up setting up an ftp server on this end, but think for now I may try simply using an ftp client. Does pretty much the same thing, plus this way I get a backup on my server and then again onto my home network all automatic. If I used the ftp option for the backup I would not get a server backup on the server.










Still looking but found this in my travels...
http://www.tech-pro.net/site-backup-cp.html
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!










BINGO!!!
http://www.gohostme.com/content/back.php
Cron that sucker and you're all set!
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!










I'll probably be doing a blog post about it shortly, but here's the amended script...
This script will allow you to make a full backup of your website (files/databases/settings/etc.) and it will FTP a tar.gz file of the full backup to any FTP server you specify and any path on that FTP server that you choose. You can fully automate the process by using cron to schedule the execution of the php file.PHP Code:<?php
// PHP script to allow periodic cPanel backups automatically.
// Based on script posted by max.hedroom in cpanel.net forums
// This script contains passwords. KEEP ACCESS TO THIS FILE SECURE!
// ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED *********
// Info required for cPanel access
$cpuser = ""; // Username used to login to CPanel
$cppass = ""; // Password used to login to CPanel
$domain = ""; // Domain name where CPanel is run
$skin = "x"; // Set to cPanel skin you use (script won't work if it doesn't match)
// Info required for FTP host
$ftpuser = ""; // Username for FTP account
$ftppass = ""; // Password for FTP account
$ftphost = ""; // Full hostname or IP address for FTP host
$ftppath = "//"; // Full path on FTP server to save files to
$ftpmode = "ftp"; // FTP mode ("ftp" for active, "passiveftp" for passive)
// Notification information
$notifyemail = "you@yoursite.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&rdir=$ftppath&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);
?>
I am now officially a LAZY WTF'er! :twisted:
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
I'm still tweaking my settings, but I think I've got it almost all the way I want it. Sucks the server backups get so big though, takes alot of bandwidth to download it!
May end up only doing it weekly instead of daily on the vps accounts because of limited bandwidth.










The frequency I set depended largely on the website.
I took a few things into account...
Size of website.
Frequency of changes to files/databases.
Some of my sites are backed up every day, some are 3 times a week, some are weekly and some (without databases) are monthly.
Toronto Forum ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ ♫ GET FREE EXPOSURE FOR YOUR BLOG!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks