Announcement

Collapse
No announcement yet.

cron jobs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
    TechGuy
    Senior Member

  • TechGuy
    replied
    This cron job seems to work perfectly, but for the 5 minutes it's running my users get: "Warning: Too many connections in /forums/admin/db_mysql.php on line 40." ... Anyway around that, even if just to display a more useful message without sending me a ton of emails?

    Leave a comment:

  • Steve Machol
    Former Customer Support Manager

  • Steve Machol
    replied
    Originally posted by SkuZZy
    You mention "my way does have a slight risk"... so what are the other ways that don't have risk?
    I already told you what it was. Here's the link:

    http://www.vbulletin.com/forum/showt...&threadid=4256

    Leave a comment:

  • ccd1
    Senior Member

  • ccd1
    replied
    That works, thanks a bunch, pogo

    Leave a comment:

  • SkuZZy
    Senior Member

  • SkuZZy
    replied
    Originally posted by Pogo
    I tried to explain it here: http://www.vbulletin.com/forum/showt...threadid=56368
    You explained well, but seems too tough for me.

    Leave a comment:

  • SkuZZy
    Senior Member

  • SkuZZy
    replied
    Originally posted by Steve Machol
    Note that my way does have a slight risk since it puts the password on the command line. Thus if you are on a shared server it is *possible* for someone to learn your db info. Just thought I'd make this clear first.
    Well, I was just about to try it, until I noticed this. I am on a shared server and I wouldn't want to risk someone else getting my entire database (which would include all my users information and e-mail addresses). You mention "my way does have a slight risk"... so what are the other ways that don't have risk? I'd definately like to get this cron job thing working.

    Thanks,
    SkuZZy

    Leave a comment:

  • Pogo
    Senior Member

  • Pogo
    replied
    I tried to explain it here: http://www.vbulletin.com/forum/showt...threadid=56368

    Leave a comment:

  • ccd1
    Senior Member

  • ccd1
    replied
    I don't have a control panel like Cpanel, all I have is my shell. How do I set up a daily cron job using that?

    Leave a comment:

  • Steve Machol
    Former Customer Support Manager

  • Steve Machol
    replied
    Yes, this is equivalent to making your backups via telnet since both of these processes are run at the command line.

    Since mysqldump locks each table prior to writing it, there's very little chance on something going wrong. However Chris Schrieber posted a script that automates this process and closes the forums during the backup procedure. You'll need to search for this. I think it's a sticky thread in one of the forums.

    Note that my way does have a slight risk since it puts the password on the command line. Thus if you are on a shared server it is *possible* for someone to learn your db info. Just thought I'd make this clear first.

    Leave a comment:

  • SkuZZy
    Senior Member

  • SkuZZy
    replied
    Also, are cron jobs a good way to make backups... same as telnet? I noticed that it was mentioned somewhere that you should close your forums while doing backups...

    Leave a comment:

  • Steve Machol
    Former Customer Support Manager

  • Steve Machol
    replied
    Yes. I have three cron backups - two a day (every twelve hours) and another one once per week.

    P.S. You could also append to your command and copy the old backup to another file prior rto making a new backup:

    Code:
    cp -f /path/to/backup.sql backup1.sql; mysqldump --opt -u USERNAME -p PASSWORD DATABASE > /path/to/backup.sql
    Steve Machol
    Former Customer Support Manager
    Last edited by Steve Machol; Mon 7 Oct '02, 10:23pm.

    Leave a comment:

  • SkuZZy
    Senior Member

  • SkuZZy
    replied
    So by adding that, it will overwrite the exisiting database from the previous day?

    Leave a comment:

  • Steve Machol
    Former Customer Support Manager

  • Steve Machol
    replied
    Just click on Cron Jobs and enter the time and command. This example will perfrorm a backup every day at 12:01am:

    Code:
    Minute &nbsp &nbsp Hour&nbsp &nbsp  Day &nbsp &nbsp Month &nbsp &nbspWeekday &nbsp &nbspCommand 
    1          0        *       *           *        mysqldump --opt-u USERNAME -P PASSWORD DATABASE > /path/to/backup.sql

    Leave a comment:

  • SkuZZy
    Senior Member

  • SkuZZy
    started a topic cron jobs

    cron jobs

    Anyone feel like explaining to me how I can backup my mysql database every night using cron jobs? I am using Cpanel 5.0 on my site. It would be good if I could make it so it does an automatic mysqdump every day or even every 12 hours (since I have the resources). Could someone help me out with this or point me to a good tutorial?

    Thanks,
    Adam
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X