Announcement

Collapse
No announcement yet.

How do I backup my database?

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

  • How do I backup my database?

    I would like to have a complete backup of my whole board and some I can get like the php files and the images but the database or the mysql is beyond my ftp client.
    I`m sure this has been asked before but haven`t found anything useful yet to a dummy of php boards.
    Please help...
    Thanks,
    Barret

  • #2
    to backup recommended to use telnet/shell access

    1. log into telnet
    2. type

    to backup

    mysqldump --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql

    to restore

    mysql -u mysqlusername -p vbdatabasename < /path/to/backup.sql

    note

    1. you will need privileges to run mysqladmin client command line so if the commands above don't work ask your web host if you have privileges to run these 2 commands - hosts using cpanel/whm control will allow you to do this

    2. on restoring the vbdatabasename would need to be a empty database, you can create and empty database named vbdatabasename2 instead

    2. backup.sql is the backup file containing your vB database data and table structure and the necessary queries to recreate your database on restoring
    Last edited by George L; Fri 8th Feb '02, 11:21am.
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3
      Hi i wonder with this backupp is all members and all mebers pasword and that in this backupp
      i'm newb so i really want to know
      so i lose nothing when i restore with this backupp

      Comment


      • #4
        Originally posted by thom
        Hi i wonder with this backupp is all members and all mebers pasword and that in this backupp
        i'm newb so i really want to know
        so i lose nothing when i restore with this backupp
        it backs up everything, members, posts, passwords, templates, styles etc
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment


        • #5
          thanks for the help

          Comment


          • #6
            When doing this

            to backup

            mysqladmin --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql

            I get invalid option for --opt
            also get it for -opt

            whats wrong?

            Comment


            • #7
              sorry guys I'm still trying to back up my database in vain, I've looked through every backup help question on here (there are loads) and I know you must be sick of repeating yourelves over again.

              but I can't get it to work...

              I try the command shown on movingservers.html and mysqladmin doesn't understand --opt what is this?

              sorry to be such a numpty but I really want to backup...

              I am in root dir when doing it I don't know what else to say?

              Comment


              • #8
                It sounds like you're running an older version of mySQL. What version is it?
                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


                • #9
                  Originally posted by bobbydavro
                  When doing this

                  to backup

                  mysqladmin --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql

                  I get invalid option for --opt
                  also get it for -opt

                  whats wrong?
                  doh sorry my mistake the command is mysqldump and not mysqladmin

                  correct command is

                  mysqldump --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql
                  :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                  :: Nginx SPDY SSL - World Flags Demo [video results]
                  :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                  Comment


                  • #10
                    I'm using putty. I need to backup the databse. It always tells me the directory or filename is invalid so I just put ...< backup.sql and that's it. It asks me for the password but then is goes bizzurk! It just spews out a million lines on encryption and doesn't stop. What's wrong?
                    Last edited by DannyITR; Fri 10th May '02, 1:49pm.
                    Danny
                    My Site ---->www.montrealracing.com

                    Comment


                    • #11
                      Originally posted by DannyITR
                      I'm using putty. I need to backup the databse. It always tells me the directory or filename is invalid so I just put ...< backup.sql and that's it. It asks me for the password but then is goes bizzurk! It just spews out a million lines on encryption and doesn't stop. What's wrong?
                      post the full command line you're using
                      :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                      :: Nginx SPDY SSL - World Flags Demo [video results]
                      :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                      Comment


                      • #12
                        mysqldump --opt -umontreal_Danny -pmontreal_mtlracing < backup11.sql

                        username: montreal_Danny
                        DB name: montreal_mtlracing



                        It's always telling me that the path is invalid unless I specify a filename that already exists on the server. If I specify a file that I already have, then it gives me all the encryption.
                        Danny
                        My Site ---->www.montrealracing.com

                        Comment


                        • #13
                          I think I got it. I was using the wrong ">"

                          Thanks once again for your help Eva.
                          Danny
                          My Site ---->www.montrealracing.com

                          Comment


                          • #14
                            Originally posted by DannyITR
                            I think I got it. I was using the wrong ">"

                            Thanks once again for your help Eva.
                            yup you got the direction wrong
                            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                            :: Nginx SPDY SSL - World Flags Demo [video results]
                            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                            Comment


                            • #15
                              Originally posted by eva2000
                              to backup recommended to use telnet/shell access

                              1. log into telnet
                              2. type

                              to backup

                              mysqldump --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql

                              to restore

                              mysql -u mysqlusername -p vbdatabasename < /path/to/backup.sql

                              note

                              1. you will need privileges to run mysqladmin client command line so if the commands above don't work ask your web host if you have privileges to run these 2 commands - hosts using cpanel/whm control will allow you to do this

                              2. on restoring the vbdatabasename would need to be a empty database, you can create and empty database named vbdatabasename2 instead

                              2. backup.sql is the backup file containing your vB database data and table structure and the necessary queries to recreate your database on restoring

                              Ok guys I'm trying to do this and I'm getting stuck on the very first part (logging onto telnet....) I know this is prolly a very simple thing so everyone here kind of abbreviates and shorthands the directions to doing this (loggin onto to telnet...) but could someone give me detailed instructions of exactly how to do this...?

                              1--- Total newbie here.... so things like

                              mysqldump --opt -u mysqlusername -p vbdatabasename > /path/to/backup.sql

                              Are kind of greek to me. I "think" i've figured that in the line above you all mean we have to substitute something different for the mysqlusername and vbdatabasename parts in the line... (Our own names and database names...but do we leave a space between those inserted variables and our name/dbase name and the u & p as shown in the example line given here?


                              2--- Even the most basic of things is a bit confusing to me... When you say "Telnet into your system" could you please tell me exactly where I should be at that point with everything else that will be necessary for a successful backup/save of my dbase? (What I mean is start at the beginning.... ok, I turn on my computer...

                              .... then I go and telnet into my computer system by going to the Start button ===> run as the very next step or do I need to start up my browser first and log onto my website before "telnetting into my system"?

                              .... Once I do the start==>run===>("then type the word") Telnet

                              I get a blank box.... is this where I type the line recommended above:

                              mysqldump --opt -umysqlusername -pvbdatabasename > /path/to/backup.sql

                              (Remembering that so far all I've done is turn on my computer... and the only variables I'm changing in the line above are the ones in boldface? Because this is one of the places that I'm lost because so far I have done nothing to indicate where my site is located...or anything like that....)

                              Sorry.. questions from a newbie...
                              Last edited by Xube; Mon 29th Jul '02, 12:26pm.
                              :p -=Xube
                              ...it's just technology

                              Comment

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