hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Cpanel crontab backup help issue
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Cpanel crontab backup help issue

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-23-2005, 02:22 PM
ithica ithica is offline
Newbie
 
Join Date: Jul 2004
Posts: 6

Cpanel crontab backup help issue


Hi!
I have shellhost account with well know cpanel. I wish to use crontab button for emailing mySQL (forum) batabases but I dont know what to write in this cpanel form as "Command to run:". It's very clear how to set up crontab time/days/weeks... etc... but this Command to run a little bit confuse me.

Let's say that I have phpBB_forum database. I could set in that damn cpanel time and mail where to send ouput - but i dont know "command to run" for that output.
Maybe this silly question sound a little bit annoying for more skilled people, but for us - newbies - even this could be problem.

I will appreciate every helpful answer.
thanx, guys

Ithica

Reply With Quote


Sponsored Links
  #2  
Old 03-23-2005, 02:28 PM
exquisihost exquisihost is offline
Newbie
 
Join Date: Mar 2005
Location: Baltimore, MD
Posts: 28
Hi,

Do you want to actually email the actual table files (as an attachment) or a mysql dump (text-output)? You could also tar-up the databases into one-file.

Let us know and we can assist.

Thanks,

Keith
Exquisihost

Reply With Quote
  #3  
Old 03-24-2005, 06:30 AM
ithica ithica is offline
Newbie
 
Join Date: Jul 2004
Posts: 6
Ahaaa... sorry for not enough detailed question. I wish email the actual table files (as an attachment) - let's say every 4th day. So that I will have in mail full mySQL (forum and CMS portal) dabase backup if somethings wrong goes with my web hosting or something. I think that this is very appropriate since I haven't possabilityes to be online that often and manually download backups.
If this isn't possibly through cpanel console I have also ssh access to shell but again I dont know exactly command.

Reply With Quote
Sponsored Links
  #4  
Old 03-24-2005, 09:16 AM
exquisihost exquisihost is offline
Newbie
 
Join Date: Mar 2005
Location: Baltimore, MD
Posts: 28
Hi Ithica,

Let's create a little bash/shell script

Something like this should work. You do this through file manager or through SSH. Let's call it mysqlbackup.sh

-------------------------------------------------------------------------------
#! /bin/bash

mysqldump -p<yourmysqlpassword> <DatabaseName> > db.backup.sql
# Note. This is all one-line
# You can tar this up if you wish
tar cvzpf db.backup.sql.tgz db.backup.sql
#Now let's send it
uuencode -m db.backup.sql.tgz db.backup.sql.tgz|mail -s MysqlBackup <youremail-address>
#Or you could also try it this way. I'll leave this commented out
mail -s MysqlBackup <youremailaddress> < db.backup.sql.tgz
---------------------------------------------------------------------------------

Make sure the permissions are 755 and you should be ok

To run this every 4 days, you can do something like this

* * */4 * * <yourdirectorypath>/mysqlbackup.sh

I haven't tested this but it should work

Hope this helps

Thanks,

Keith
Exquisihost

Reply With Quote
  #5  
Old 03-24-2005, 11:28 AM
ithica ithica is offline
Newbie
 
Join Date: Jul 2004
Posts: 6
Thank you for your time - I will try and give you feedback in few days. Really thanx!


So this cPanel crontab form is usefull in this case just for mysql dump (text-output) and not for sending backup as attachment?

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
cPanel Conference 2012: Branding and How to Do it Better with Felipe Gasper Web Hosting News 2012-10-09 18:00:02
Video: cPanel and Attracta Talk About Integrating SEO Tools into the Hosting Control Panel Whir Tv 2012-08-31 14:10:47
Monday Demo: CodeGuard's Website Backup and Restore Tool Blog 2012-02-13 11:11:01
cPanel Kicks Off Automation Bootcamp Conference on Monday Web Hosting News 2011-10-07 14:49:20
cPanel to Launch Certification Program at cPanel Conference 2011 Web Hosting News 2011-09-21 18:15:42


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?