View Full Version : Please advise - How to backup customers' website automatically?
twinbros 02-22-2004, 06:48 AM Hi there,
I provide all in one service for my customers (Domain, Host and Web design), and I want to backup their websites automatically and this is my wish list:
- Back up websites daily or weekly.
- My customers use Cpanel
- I want to backup (download) to my local PC.
- We use reseller packages (not dedicate server).
- Always have 3 backups for a website (the 4th will be replaced by the newest).
- websites can be restored by one click (option)
Is there any software can do it?
Please advise.
Thank alot,
TWINBROS
AlainG3 02-22-2004, 07:15 AM i am in the same wish with you
and would like to know what is the suggestion from WHt member
thanks
Techark 02-22-2004, 09:05 AM No way to do it auto to your local hard drive unless you have a static IP from yout local ISP and are connected 24/7. I am afraid you will just have to use the cpanel backup utlity and then download them to your local drive manual.
seekhosting 02-22-2004, 10:07 AM Hi,
I think you can use the "Cron Job" feature in the cPanel of each account. Just set a home backup job command in any specified time (e.g. 3:00 am everyday, or 3:00 am and 3: pm everyday). However, it's better to set the Cron Job in midnight.
This is better to backup the files to other server connect with the Internet if you do not have a fixed IP address for your own PC.
Best regards
AlainG3 02-23-2004, 06:25 PM thanks for the response, its not easy though ..
eddy2099 02-23-2004, 07:46 PM With a dedicated server, it will be easier to accomplish since you have root access and WHM does come with the backup facility. The feature does not seems to come with a reseller's account. You may want to have your customers do their own backups manually. Cpanel has that facility.
jnass 02-24-2004, 04:19 AM Seekhosting could you please enlight us by providing the Cronjob command needed for backing up from CPanel?
seekhosting 02-24-2004, 05:10 AM jnass,
Actually, I wish to do such Cron Job a few months ago. However, I am too busy so I put aside this project.
But I think the backup job should be able to perform in the Cron Job feature in the cPanel.
If I have time, I will try.
Best regards
If you have root access I'd imagine one of the best ways is to use the automated backup facility in cpanel and then write a cron job that will email the file to yourself?
Keiron
datums 02-24-2004, 10:36 AM If you have your own server add a backup drive.
If you want to do it with a cron job and the site is small enough.
You could zip and send the file to yourself.
It's morning, so I will be fully thinking around 11am
That was kind of my thinking, I have backup drives in my servers, but if you don't have root access to WHM I'm not sure it's possible to automate the backup.
Maybe your host would setup a cron job to copy their backup to your homedirectory and then you could write your own cron job to email it to yourself? I'd be more than happy to do this for my clients.
Keiron
colden 02-24-2004, 03:19 PM Try using Robo-FTP. It's available on shareware sites. With it, you can set automatic downloads (unattended).
I don't use it, but it looks promising.
generalerror 05-05-2004, 04:13 PM Can anybody give me the syntax for backing up a control Panel account VIA a cron job? I know virtually nothing about nix and I would like to automate the backups.
nex0r 05-06-2004, 07:52 AM I use Globalscape's Cute FTP Professional 6, it has a backup remote folders feature and includes archiving, scheduling and filtering. So each website I want to back up has it's own scheduled job.
It's probably not the best way to do it and it would depend on how many site you want to back up but it does it automatically over night and I end up with a dated zip file for each backup.
Hope that helps
Nnyan 05-07-2004, 06:06 PM This is a bash shell script that I run on crontab to backup my mysql db's. I'm sure it can be modified to backup regular files
#! /bin/bash
mydate=$(date +%m%d%Y%I%M%p)
PATH=$PATH:/usr/local/bin
export PATH
/usr/local/mysql/bin/mysqldump --flush-logs --opt -u mysqlusername -pmysqlpassword databasename > /dir1/dir2/dir3/backup.sql
cd /dir1/dir2/dir3/
if [ -e backup.sql ]
then
tar -czvf backup-$mydate.tar.gz backup.sql
fi
if [ -e backup-$mydate.tar.gz ]
then
lftp <<EOF
open ftpserver
user username password
pwd
put backup-$mydate.tar.gz
bye
EOF
fi
if [ -e backup.sql ]
then rm /dir1/dir2/dir3/backup.sql
othellotech 05-07-2004, 09:05 PM Originally posted by BWS
write a cron job that will email the file to yourself?
the the backup file(s) are large, email is *not* the best way to transfer them,
hell even if they're small it's not the best way to transfer them,
thats *if* the mail system at the other end will even allow them..
back to the problem ...
cpanel backup daily to /backups partition
cron job to run afterwards to scp them of to a remote location (be that your home/2nd server/offsite backup service etc)
you *do* realise that this will eat your transfer allowance up pretty quick, if high-availability is more of a concern, 2 servers, rsync, some form of ip switch on failover ....
|