Cron Job In Cpanel. Want To Automate Backups

Aug 20, 2007

I have been doing some research and I would love some help with this. I want to set up a cron to automatically backup my site's files & databases once a month. And I am not sure what how I do it?

- Do I need a script on my server and then the cron job runs it?
- Is there a better way to do this then cron?

View 6 Replies


ADVERTISEMENT

Using CRON To Restore CPanel Backups Daily

Nov 21, 2008

A couple weeks ago, I encountered a big server crash on my VPS that caused me a lot of downtime. I'm currently trying to figure out a solution to keep a current "clone" of all of my server accounts on a second server. That way, if I ever encounter another crash, I'll be able to simply change DNS information to have all accounts "live" using the backup server.

I appreciate any input, advice, suggestions, criticism, etc. Here's what I have in mind...

1. I currently have all of my websites hosted on Server #1. (We'll call it that for the sake of avoiding confusion.)

2. I have an automatic nightly backup setup via cPanel / WHM that backs up all accounts from Server #1 to Server #2 via FTP. (Server #2 is in a totally different data center, with a different provider.)

3. The nightly backup packages all of the accounts as "cPanel Full Backups." So, they're compressed, and as such, they don't work as "live, functioning websites" on Server #2.

The only way to make them "live and functional" on Server #2 would be to use cPanel to "restore" the backups.

4. So, what I'd like to do is setup a CRON job that would automatically "Restore" the backups each morning on Server #2. That way, Server #2 would always have a functional version of all my accounts, that is less than a day old. Then, if Server #1 ever crashed, I'd just have to change DNS information to point to Server #2, and all of the websites would be live again, without having to physically restore all of the backups using cPanel.

I don't know a ton about CRON. However, as I understand it, CRON couldn't actually make cPanel restore the backups. However, I'm assuming that when you use cPanel's "Restore" function, it just goes through a series of processes. So, it seems logical to me that, if you knew what those processes were, you could write a CRON job to automate the process every morning.

Did that make sense?

If so, is it possible?

Do you guys have any input, criticism, etc?

If it's doable, can you make any suggestions that would help me make this happen?

Finally, if you think you have the expertise to make this happen, I'd be interested in chatting with you via Private Message. I'd be willing to pay to have this done.(Note to Moderators: I'm not sure if my last comment is allowed or not ... if not, please feel free to remove it. I'm far more interested in the discussion of this process than trying to solicit help in making it happen.)

View 5 Replies View Related

Using CRON To Restore CPanel Backups Daily

Nov 21, 2008

I encountered a big server crash on my VPS that caused me a lot of downtime. I'm currently trying to figure out a solution to keep a current "clone" of all of my server accounts on a second server. That way, if I ever encounter another crash, I'll be able to simply change DNS information to have all accounts "live" using the backup server.

I appreciate any input, advice, suggestions, criticism, etc. Here's what I have in mind...

1. I currently have all of my websites hosted on Server #1. (We'll call it that for the sake of avoiding confusion.)

2. I have an automatic nightly backup setup via cPanel / WHM that backs up all accounts from Server #1 to Server #2 via FTP. (Server #2 is in a totally different data center, with a different provider.)

3. The nightly backup packages all of the accounts as "cPanel Full Backups." So, they're compressed, and as such, they don't work as "live, functioning websites" on Server #2. The only way to make them "live and functional" on Server #2 would be to use cPanel to "restore" the backups.

4. So, what I'd like to do is setup a CRON job that would automatically "Restore" the backups each morning on Server #2. That way, Server #2 would always have a functional version of all my accounts, that is less than a day old. Then, if Server #1 ever crashed, I'd just have to change DNS information to point to Server #2, and all of the websites would be live again, without having to physically restore all of the backups using cPanel.

I don't know a ton about CRON. However, as I understand it, CRON couldn't actually make cPanel restore the backups. However, I'm assuming that when you use cPanel's "Restore" function, it just goes through a series of processes. So, it seems logical to me that, if you knew what those processes were, you could write a CRON job to automate the process every morning.

Did that make sense?

If so, is it possible?

Do you guys have any input, criticism, etc?

If it's doable, can you make any suggestions that would help me make this happen?

Finally, if you think you have the expertise to make this happen, I'd be interested in chatting with you via Private Message. I'd be willing to pay a reasonable sum for some help with this.

View 5 Replies View Related

Bash Automate The Installation Of YUM, CPanel/WHM And CSF

Jul 2, 2009

I am trying to automate the installation of YUM, cPanel/WHM and CSF.

I have written a script that works perfectly all the way down to installing CSF...

It gives me the following error when moving onto the CSF installation;

--05:03:37-- [url]
Resolving www.configserver.com... 85.13.195.235
Connecting to www.configserver.com|85.13.195.235|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 433358 (423K) [application/x-tar]
Saving to: `csf.tgz'

100%[=======================================>] 433,358 338K/s in 1.3s

05:03:39 (338 KB/s) - `csf.tgz' saved [433358/433358]

--05:03:39-- http://%0D/
Resolving 15... failed: Name or service not known.
FINISHED --05:03:39--
Downloaded: 1 files, 423K in 1.3s (338 KB/s)
tar:
: Not found in archive
tar: Error exit delayed from previous errors
./cPanelServer.sh: line 9: cd: csf: No such file or directory
sh: install.sh: No such file or directory
./cPanelServer.sh: line 13: unexpected EOF while looking for matching `"'
./cPanelServer.sh: line 18: syntax error: unexpected end of file
Script Contents;

Code:
./yum.sh
cd /home
wget layer1.cpanel.net/latest
sh latest
cd /
rm -fv csf.tgz
wget [url]
tar -xzf csf.tgz
cd /csf
sh install.sh
echo -n "TESTING = "1"
read word
sed "s/$word/TESTING = "0"/g" /etc/file.conf > /etc/file.conf.new
mv /etc/file.conf.new /etc/file.conf
service csf restart

done

It's seems the script is having issues extracting "csf.tgz", but I have no clue.

TBH, this is my first ever script and I'm surprised any of it works!

View 6 Replies View Related

Do Any Control Panel Packages Automate Security Updates?

Feb 6, 2009

I'm wondering if anything like directadmin, whm, etc can automate security updates to apache, mysql, php etc?

View 3 Replies View Related

Cpanel Backups

Apr 14, 2009

I would like to know what is the difference in cpanel between a full backup and a daily or weekly backup, and how they work together. I was under the impression that a daily backup was a backup of all the files at the end of the day but apparently according to my host this is not so, and Im a bit confused as to what is the purpose of the daily and weekly backup.

View 2 Replies View Related

How Can I Backup CPanel With Cron

Nov 6, 2008

I just went through a week of nightmares, because my host lost hard drives and stuff.. lost my data, etc.. what ever..

I want to work out how I can cron cPanel backups. I did a search online for a cPanel backup manager, but I didn't have much luck.

Or, maybe there's some other way to get regular backups?

I don't really need to backup my whole sites. I keep my files locally, but of course I don't have the databases locally -- or the email records.

All I "really" need is the database SQL files, so that I can rebuild my forums if need be, and also the email setup files -- because I have over 50 domains and I have emails set up on all of them.

I want to have them emailed to myself.

There's an option in cPanel too, which allows me to "generate/download a full backup".. well, how do I "restore" the backup? ie: I know how to backup and restore the home directory, databases and email stuff (there's 3 options in cPanel), but there doesn't seem to be anywhere to restore the full backup.

Anyway, can anyone give me advice on how to keep backups of my cPanel accounts? I don't trust hosts anymore. They say they back stuff up, but they never to.

View 5 Replies View Related

Cpanel Cron Backup To Ftp

Nov 19, 2007

Im setting up new windows server, packed with only FTP server (FileZilla) to remote backups.

How can i get my cpanel account make backups and upload them to my FTP server as an cron job? Offcourse i have option to backup via cpanel, but this is needed to do manually every time (setting remote ftp ip, account, passwd etc,).

Is there a option in cpanel / whm to do full-backup all my accounts in my reseller account? Or do i need to do it per account? Some of my servers is only reseller accounts without root access, only reseller account.

View 1 Replies View Related

CPanel Standard Cron Job

Mar 1, 2007

I want to know how to get this cron job to work. Get a php script to run at certain times, etc.

View 4 Replies View Related

CPanel Remote Backups

Feb 5, 2009

We all know about backups, and compressing files, etc etc... so, what do you guys do in this situation?

I have a quad core, 4gb ram, 250gb disk, when I run cpanel backups to my remote server, the server loads go up to 3.

Is there any way I can control this and lets say... dont let it go bellow 2?

Improved Backup Performance — Speed is safe.

cPanel’s backup facilities in 11.24 have seen significant speed increases. In previous versions, load averages while backups were running could be as high as 3. With our reworked and enhanced backup system, load averages tend to stay around 1.2 when backups run on servers with many accounts. This is an extremely substantial performance increase that you and your customers will notice right away. With our new backup system, there is no reason not to keep your data safe."

View 12 Replies View Related

Securing Cpanel Backups

Jun 26, 2008

I decided to use cPanels backup in a remote FTP server. But before that I want to password protect all the backups so that none unless me can open /restore the backups.

View 3 Replies View Related

Cron Not Working On CPanel Server

Nov 9, 2008

How do I make sure that there are cron jobs running on my cPanel server? I have root access, etc...just not sure why my crons aren't running. Nothing weird going on.

View 7 Replies View Related

[cPanel] Cron Not Adding Entries

Oct 9, 2007

I have problem witch crontab in cPanel. Cron not adding entries in cPanel --> Cron jobs. No errors.

View 3 Replies View Related

Server Path(s) For Backups With Whm/cpanel

Mar 9, 2008

Anyone know the server path(s) for backups with whm/cpanel?

I'm talking about the backups that are kept for sites where they can be downloaded via web from cpanel. (daily, weekly, monthly)

View 3 Replies View Related

Corrupted MySQL Backups CPanel

Mar 18, 2008

Just a warning to all other hosts out there using cPanel it currently generates corrupted mysql backups due to a bug in their pkgacct script which has been like this for over 6 days now.

[url]

So for anyone out there it's an easy fix.

Of course not every host is doing it so the fun of helping a customer migrate data and explain to them that their hosts backups being made are all corrupted is lots of fun.

Sort of sad but I've been told this isn't a critical enough issue to even push it out to all versions. Right now it makes a great lock in so customers cannot switch providers without a lot more work.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved