Backup my MySQL databases automatically

Discussion in 'Site & Server Administration' started by khalled, Jun 18, 2009.

  1. #1
    I won't to backup my vbulletin 3.8.2 database automatically (daily,weekly, ...,) , the forum database size more than 120 megabyte and i have Linux VPS Server
     
    khalled, Jun 18, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Well if u have ssh access make a simple .sh file and setup a cron
     
    Bohra, Jun 18, 2009 IP
  3. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #3
    If you have cPanel server you can also set daily, weekly and month backup for your entire site.

    Kailash
     
    kailash, Jun 18, 2009 IP
  4. khalled

    khalled Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    how i can make .sh and setup

    i use Plesk
     
    khalled, Jun 18, 2009 IP
  5. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #5
    You don't need to create an .sh file. In your crontab, you can simply call a mysql dump:

    mysqldump -u dbusername --password='dbpassword' username_dbname > /home/username/file.sql
     
    RHS-Chris, Jun 18, 2009 IP
  6. kailash

    kailash Well-Known Member

    Messages:
    1,248
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    190
    #6
    kailash, Jun 18, 2009 IP
  7. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #7
    Well actually doing that would just rewrite the old databese over the new one
     
    Bohra, Jun 18, 2009 IP
  8. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #8
    That would rewrite the backup file, not the database itself. If you wanted to do daily, weekly, monthly, all you would need to do is create different cronjobs that are called at different times, and dump to a different file. ex: daily.sql, weekly.sql, monthly.sql
     
    RHS-Chris, Jun 19, 2009 IP