Announcement

Collapse
No announcement yet.

Cron to run backups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cron to run backups

    Hi,

    Can someone post a working cron job I can use to backup my database nightly.

    I have this but it doesn't work.

    Code:
    mysqldump --opt -U DBUSER -p DBPASSWORD DBNAME > /path/to/backup.sql
    Thanks,

  • #2
    That should work with the proper values. What did you do exactly and what is not working?
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Code:
      mysqldump --opt -U DBUSER -p DBPASSWORD DBNAME > /path/to/backup.sql
      should be

      Code:
      mysqldump --opt -U DBUSER -pDBPASSWORD DBNAME > /path/to/backup.sql
      right? You can't have the space between -p and the password

      Comment


      • #4
        I just replaced the place where my values should be with mine.

        I get this when the cron tries to run...
        mysqldump: unknown option '-U'
        What can I do?

        Thanks,

        Comment


        • #5
          Originally posted by matt4 View Post
          I just replaced the place where my values should be with mine.

          I get this when the cron tries to run...


          What can I do?

          Thanks,
          For my DB backups I use:
          Code:
          mysqldump --opt -Q -e --hex-blob --skip-comments -u USER --password=PASSWORD DATABASE > mysql-backup.sql
          http://data.collectiveirc.net/status/user/Jobe.png

          Comment


          • #6
            Thanks, Does this still send a email out?

            Comment


            • #7
              Any idea why none of them work for me?

              Comment


              • #8
                What do you mean it doesn't work? Is there some error message?

                Comment


                • #9
                  I've been using
                  http://sourceforge.net/projects/automysqlbackup/
                  ...steven
                  www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
                  bmwcca.org/forum | m135i.net
                  "I tried to clean this up but this thread is beyond redemption." - Steve Machol

                  Comment

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