Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    2

    Default HELP! I need a Backup Script to Backup SQL Nightly... [moved]

    Does anyone know of or can point me to a script that I can use as a Cron Job in CPANEL that will allow me to have a nightly backup of the entire SQL database emailed to me?


    Thanks to anyone!!

    -John

  2. #2
    Member kran's Avatar
    Join Date
    Jul 2003
    Location
    Colombia
    Posts
    75

    Default This might help

    It´s no a linux app. but I use backupwhatcher for mysql, it backups databases to local PC



    http://www.dswsoft.com/index.php

  3. #3
    Member
    Join Date
    Dec 2003
    Location
    Maryland
    Posts
    98

    Default

    it shouldn't be hard to write a cron job to dump the sql databases via the command line and use some lightweight command line ftp app to send it off.. or it doesn't even have to go anywhere.

    I used to have one...
    Let me see if I can dig it up.

    Chew

  4. #4
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    504

    Default

    Checkout MySQLdumper. It is a very useful script that can be tweaked as per requirement.

    http://www.mysqldumper.de/en/index.php

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  5. #5
    ujr
    ujr is offline
    Member
    Join Date
    Mar 2004
    Posts
    292

    Default

    and this:

    "This script will allow you to maintain a database backup at any time interval you set. When you upload it to your server, you may set it up on a crontab and let it run daily, weekly or monthly. This script connects to your database, builds a backup "dump" file, gzip's it and either sends it to your email address or uploads it to an ftp server that you configured and cleans up the temporary files."

    http://www.phpfreaks.com/script/view/11.php

  6. #6
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    If it is only nightly - why can you not simply copy from the Cpanel backup that was already made?

    /backup/cpbackup/daily/*/mysql

    Has all the mysql databases.

    You can rsync them or whatever.
    Lloyd F Tennison

  7. #7
    Registered User
    Join Date
    Jul 2003
    Posts
    2

    Default

    try

    #!/usr/bin/expect -f



    set root_pass "123456789"

    set hostname "123.45.678.910"



    set folder "/backup/cpbackup/daily"



    spawn /usr/bin/scp -r $folder root@$hostname:/backup/servername/daily

    sleep 3

    expect "password: "

    sleep 3

    send "$root_passr"

    interact

  8. #8
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Quote Originally Posted by bmaworld View Post
    try

    #!/usr/bin/expect -f



    set root_pass "123456789"

    set hostname "123.45.678.910"



    set folder "/backup/cpbackup/daily"



    spawn /usr/bin/scp -r $folder root@$hostname:/backup/servername/daily

    sleep 3

    expect "password: "

    sleep 3

    send "$root_passr"

    interact

    Bad idea. Never ever have your root password in plain text.
    Regards,
    David
    Forum Moderator

Similar Threads & Tags
Similar threads

  1. Script to backup ONLY SQL or ONLY homedir?
    By ChaniWalls in forum Data Protection
    Replies: 2
    Last Post: 12-08-2009, 09:21 AM
  2. Replies: 3
    Last Post: 10-24-2008, 09:41 PM
  3. Help! I need script for Auto Backup for SQL
    By jeepj27 in forum Database Discussions
    Replies: 1
    Last Post: 09-12-2006, 07:45 PM
  4. Help! I need script for Auto Backup for SQL
    By jeepj27 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-12-2006, 07:45 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube