Announcement

Collapse
No announcement yet.

SSH for Dummies?

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

  • SSH for Dummies?

    I made a backup of vB when I was under my previous host using the backup option in the admin cp. Which section of the "Changing Servers" guide should I start the restore process with? Also, which path are you supposed to upload the SQL dump to? I am dumbfounded by the SSH instructions.

  • #2
    You can upload the file to just about anywhere you want.

    at the prompt type: mysql -uUSERNAME -p newdbname < path/to/dump.sql
    So wherever you stored the file, just log into MySQL, and then type "<" followed by the path to the dump.sql file.

    Example: I stored the file in /users/radon3k/www/vb/dump.sql

    I would log into MySQL and once I was in type:

    < /users/radon3k/www/vb/dump.sql



    That should work, as it is following the instructions found here

    Hope this helps, ask if you have more questions!

    Radon3k.

    Comment


    • #3
      Originally posted by Radon3k
      You can upload the file to just about anywhere you want.



      So wherever you stored the file, just log into MySQL, and then type "<" followed by the path to the dump.sql file.

      Example: I stored the file in /users/radon3k/www/vb/dump.sql

      I would log into MySQL and once I was in type:

      < /users/radon3k/www/vb/dump.sql



      That should work, as it is following the instructions found here

      Hope this helps, ask if you have more questions!

      Radon3k.
      But I have the SQL dump stored on my harddrive. Should I just FTP it to my server?

      Comment


      • #4
        One of my users recently saw this and the syntax provided did not work for him. If the above does not work try this.

        mysql -uusername -ppassword -D databasename < /path/to/database.sql
        AlphaOmegaHosting.Com
        http://www.alphaomegahosting.com

        Comment


        • #5
          Originally posted by dandanfireman
          One of my users recently saw this and the syntax provided did not work for him. If the above does not work try this.

          mysql -uusername -ppassword -D databasename < /path/to/database.sql

          So all I would need to do is

          mysql -uusername -ppassword -D databasename < c:/vBbackup/vbulletin.sql ??

          That doesnt seem too hard.

          Comment


          • #6
            Yeah, you'll defintely have to put the file on the server. No way the MySQL database can get to if it's not. The MySQL database is connected to the server, not your computer.

            To dandanfireman: I used the syntax that I posted and it worked fine for me

            Comment


            • #7
              Do I have to create a DB before SSHing the backup?

              Comment


              • #8
                You need to create a MySQL database on the new server. To make it easier on yourself, just make it the same dbname, user name, and password as the old one.

                Upload the dump.sql file via FTP to any part of your server you'd like.

                Comment


                • #9
                  Originally posted by Radon3k
                  You need to create a MySQL database on the new server. To make it easier on yourself, just make it the same dbname, user name, and password as the old one.

                  Upload the dump.sql file via FTP to any part of your server you'd like.
                  OK, i got it to work Which files should I delete after installation besides install.php? Should I get rid of the upgrade.php files?

                  Comment


                  • #10
                    Yes, remove the upgrade files as well.
                    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


                    • #11
                      Great! Glad to hear it!

                      Comment


                      • #12
                        Originally posted by inthezone
                        So all I would need to do is

                        mysql -uusername -ppassword -D databasename < c:/vBbackup/vbulletin.sql ??

                        That doesnt seem too hard.
                        I have heard it's a bad idea to include your password in this command line. Instead of typing "-ppassword"... just type "-p"... without the quotes of course. After you hit ENTER, you'll be prompted to type in your password... which is supposed to be a more secure way of transmitting your password.

                        Comment


                        • #13
                          Good point sir

                          However, to be more accurate, the transmission is not so much the problem, but the fact that commands are logged to a history file that could be reviewed/read. The acutal transmission is no different between the 2. Provided this is being done via ssh, it should be secure from a network standpoint.
                          AlphaOmegaHosting.Com
                          http://www.alphaomegahosting.com

                          Comment


                          • #14
                            Thanks for explaining about the history file. Is this "history file" the same thing as the log file containing ever IP address that has accessed the site? You know, the log contains IP address, browser and platform info, whatever image that was downloaded and so on.

                            Comment


                            • #15
                              I think you are referring to the site's access_log or whatever your server administrator chose to call it.

                              I am speaking specifically about a hidden file in a user's home directory called .bash_history provided you are using a bash shell.
                              AlphaOmegaHosting.Com
                              http://www.alphaomegahosting.com

                              Comment

                              Loading...
                              Working...
                              X