Raised This Month: $32 Target: $400
 8% 

Cron Jobs and Backing Up databases


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 01-19-2008 , 17:53   Cron Jobs and Backing Up databases
Reply With Quote #1

Hey everyone, I have a question regarding the use of Cron Jobs and backing up SQL databases.

I have a database we will name "slm_db1" that I use for vital website/server information. However, I need to backup said database more than I do (recently my webhost deleted my user account associations leaving me deleting databases when I accidentally deleted a system critical database out of frustration and blind rage). I have access to CPanel which provides just basic "Backups" but it cannot be scheduled to backup say once a week but only every time I press the button to back it up. I'd like to know how I could go about retrieving a backup automatically whether having it saved to my webserver or sent via e-mail to me via Cron Jobs or any other method/script you can think of that is secure enough.

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-19-2008 , 19:51   Re: Cron Jobs and Backing Up databases
Reply With Quote #2

Input your cPanel details and the FTP info of where to upload the back up to and your email address (Email notify doesn't always work for me). Just edit the file, upload it to your site, and cron it and it will do a backup for you.
Attached Files
File Type: txt cpanelbackup.php.txt (2.1 KB, 175 views)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 01-19-2008 , 20:05   Re: Cron Jobs and Backing Up databases
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
Input your cPanel details and the FTP info of where to upload the back up to and your email address (Email notify doesn't always work for me). Just edit the file, upload it to your site, and cron it and it will do a backup for you.
This is a great help, however this from the looks of it is meant to perform a full backup of my site when I don't know if a full backup is completely necessary seeing that I am providing over 30 members of these forums with space (many of which have same/similar files), it would waste space. I also read through the script and if I understand correctly:

Code:
fputs($socket,"POST /frontend/".$skin."/backup/dofullbackup.html?".$params." HTTP/1.0\r\n");
this would attempt to go into http://mydomain:2082/frontend/backup/dofullbackup.html and grab the information when really that does not exist on my CPanel (Cpanel X if that makes a difference). Plus, I was wondering if I could configure that to say be configured to "http://mydomain.com:2082/getsqlbackup/slm_01.tar.gz" so that it only backs up my database on a regular basis? I also want to backup other stuff, but frankly, I don't want to backup all the users I give free space to (not because I'm mean, but because I would much rather not waste that space when it's already on the internet plenty).

Slmclarengt
__________________
But we don’t beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-19-2008 , 20:19   Re: Cron Jobs and Backing Up databases
Reply With Quote #4

Yes, the script is for a full backup. The part that you quoted puts data on that page using post. You can change up the script to fit your needs with the SQL backup, I am just not sure what params each page requires. I just gave you a base script that I had found someplace.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode