Web Hosting Talk







View Full Version : Cpanel Backup


mpope
08-01-2001, 01:01 PM
Hello,

I'm looking for a way to backup cpanel over a network. For example, I will want to completely backup my server, and send the .tar to an offsite computer.

Are there any scripts available to do this? If not, what commands should I use to do this?

How is everyone else backing up their WHM / cpanel servers?

Thanks!

BurstNET
08-01-2001, 01:20 PM
Most CPanel users are using a copy of burstbackup, without permission, that is making it's way across the net.
burstbackup is a backup script that our company wrote that backs up customer data and server configs to /backup in three parts (/monthly, weekly, & daily) on a spare ide drive in the server.
Most likely it was renamed to something else, credits for our authoring removed, and distributed without authorization.

Sean R.
BurstNET

teck
08-01-2001, 01:54 PM
Ahh yes, I've seen lots of cpanel boxes with that script..

JonnyQuags
08-01-2001, 02:10 PM
We backup to other servers using rsync, it does not tar up the server files and send them over but will copy all the files over at first, then additional times it runs only make changes to changed files. You man want to check out that command or scp (man scp for more info).

mpope
08-01-2001, 04:58 PM
Sean,

Sounds like a great script! Any chance of me getting my hands on a legal copy? (even though I'm not a customer of yours) :~(

Tcoy - Thank you, I will check it out!

qps
08-01-2001, 06:14 PM
Is it possible to get a copy of this "burstbackup" in a legit way? I called, and the person I spoke with told me that they didn't know what I was talking about...

WeinBar Jack
08-01-2001, 07:00 PM
Originally posted by BurstNET
Most CPanel users are using a copy of burstbackup, without permission, that is making it's way across the net.
burstbackup is a backup script that our company wrote that backs up customer data and server configs to /backup in three parts (/monthly, weekly, & daily) on a spare ide drive in the server.
Most likely it was renamed to something else, credits for our authoring removed, and distributed without authorization.

Sean R.
BurstNET

Sean:

Please do not use the word "most". A proper word here would be "some".

BurstNET
08-01-2001, 08:50 PM
We checked, it IS on "most" Cpanel servers....
This is not a new issue, this has been going on for over a year now, back when Cpanel was all licensed from VDI.
We never bothered to do anything about it, cause it is really not worth the trouble.
You yourself may not have it, or even if you do, you may not be using it.
Heck, even if you do have it, you may not have been aware it is stolen code.
You may have gotten it from another provider that initially "borrowed" our coding, removed any mention of BurstNET, and renamed the script.
I don't specifically remember stating "WeinBar" is using our code without permission.
This is also not the only script we have written to use with Cpanel servcers, that mysteriously got into the hands of most servers running cpanel.
Most likely they were copied from a box we used to host, and moved elsewhere by an ex-client, or even a current client that hosts servers in multiple facilities.

What was amusing is a few CPanel hosting companies we bought..when we obtained their servers, and found out that they were using our code to do backup services.

Sean R.
BurstNET

mpope
08-01-2001, 08:55 PM
So, does that mean you won't sell me a legal copy? =(

I'd really like to use your code (and I don't want to use it unless it is legit)... but I can understand if you only allow it for in-house servers... just let me know!

Thanks,
Matt Pope

BurstNET
08-02-2001, 01:14 AM
It is supplied only to internal servers, and external Cpanel licenses for BurstNET clients.
However, just wait a little bit, and a slightly better version will be built into NOCSoft, as well some other nifty related features.

Sean R.
BurstNET

bbrader
08-02-2001, 02:52 AM
Just use rsync, its free :)

-Brendan

sodapopinski
08-02-2001, 03:11 AM
Originally posted by BurstNET
Most CPanel users are using a copy of burstbackup, without permission, that is making it's way across the net.

why don't you input some unique server info and then compile it? so noone could copy and use it to their own box. :confused:

neon202
08-02-2001, 04:34 AM
Originally posted by bbrader
Just use rsync, its free :)

-Brendan

rsync looks cool.

mpope
08-02-2001, 01:27 PM
Does anyone have any good html resources for Rsync? I've read the man pages, but still have a few quetsions.

Thanks!

bbrader
08-02-2001, 01:36 PM
rsync is more than adequate to perform backups for a server, for free...

http://rsync.samba.org/

That page should have lots of info to help get you started.

-Brendan
HostRocket.Com

Darkedge
08-09-2001, 01:55 PM
Hello,
I am backing up cpanel info from a cpanel vdi machine to a windows ftp server. I was using tar then ftping the file but I am running into the problem that tar can't go over 2 gigs. Any ideas. rsync sounds good but can it work with win2 ftp server.

superiorhost
08-11-2001, 01:49 AM
Hi,
It isn't that tar won't go over 2 gigs... it will. It is that a Linux box will not handle a file over 2 gigs. Once you pass that it will mess it up bad.

That is where the trick of back ups is at. You don't tar the whole /home diretory... you have to make the script tar each users site in the home directory seperately.

Then you have a back up that is simple to access if you need it.

The bad thing about using a one or two liner to tar the files, is that it runs real hard on the server. Doing an incrimental is much easier on the server load.

I am heading away for a break, but I have some rough code that does work... I have it running on 5 servers., it is just a real program would be much better on the CPU load.

I think I will look over rsync again, but there was something I didn't like about it before. Perhaps just lack of direction.. can't remember.

I will post my little script so you can at least have something that Does work until you find something better.

Tim L :cool:

teck
08-11-2001, 02:07 AM
What about ftpbackup? Someone already written a script.

qslack
08-11-2001, 02:18 AM
Originally posted by superiorhost
you have to make the script tar each users site in the home directory seperately.

I think this would work:

cd /home
find . -type d|xargs tardir

tardir should be in your path, executable, and contain the following:
#!/bin/sh
tar czfv $1.tar.gz $1

Works fine for me...is that what you want to do?

Or:
perl -e '@dirs=`ls /home`; foreach $i (@dirs) {chomp $i; system("tardir $i");'

superiorhost
08-11-2001, 02:28 AM
Here it is. Like I said, it is a bit simplistic, but it works well. I have tried to put in decent directions for the newer guys. It makes single zips on each site, so the 2 gig limit is no problem.

I looked for a back up script that worked for quite some time, I settled on this simple code used at first to move our sites from one server to another... changed it a bit, and poof.. there is a simple back up script for the sites... but just the sites.

Ok, now if you run these from a cron for each day you want them to run, it is a simple but afective way to back up your users sites.

This is the script.. not much to it:

for i in *; do tar -cvf /backup/Fri/$i.tgz $i ;
done

Note:
BACK UPs --- replace Fri with the day you want it to run-- make the directory in the back up disk. This will zip a copy of every folder in the /home directory of your server.


Now, to make a crontab, (from root)
This is a sample cron entry:

0 3 * * 5 /scripts/backuphomedirs-Fri

Now, this backs up at 3 am each Friday.

Notice you need a script for it to run. Make a script in pico or vi, and put it in any directory then make the cron file call it there.

Here is the script I named backuphomedirs-Fri:

cd /home
for i in *; do tar -cvf /backup/Fri/$i.tgz $i ;
done

Just create it logged in as root, make the cron file entry while logged in as root, and make teh directory on your back up disk for it to load into. It will not make the directory without telling it to, so make them before hand. This will overwrite the last fridays zip when it runs.

To make that cron entry...
as root, type:

crontab -e

Don't ask me why, but nobody ever tells the new guys how to get there.. it opens the cron list in pico, so know how to use pico before you do this, or have your tech set this up for you.

Just make the script, corn entry, and directory for each day you want it to back up the sites. Remember, you need a script for each day too. Otherwise you will have just one back up folder, and it will renew each time the script runs.


Have fun with it... the way it is written, it backs up to a second drive on the same machine. Can easily be changed to back up to the same disk but I wouldn't reccomend that at all. If the disk goes out, you loose your back ups too.

If I missed something, there are enough techies in here to help out ... I am going to get away for a few days.

Tim L :cool:

qslack
08-11-2001, 03:38 AM
Originally posted by superiorhost
for i in *; do tar -cvf /backup/Fri/$i.tgz $i ;
done

Wouldn't you want it to gzip the tar files? It might take a tiny bit more CPU time but it will save tons of disk space. Replace '-cvf' with 'czfv'.

mpope
08-13-2001, 01:48 PM
Does this work with the czfv? I'm about to set this up, and would love if gzip'ing would save on some space!

Thanks!