Announcement

Collapse
No announcement yet.

Moving, mySQL dumps, telnet and Hair pulling

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

  • Moving, mySQL dumps, telnet and Hair pulling

    Hi guys! I'm in desperate need of some help with telnet. We're going to be moving to the vservers Ultra plan this week. Short of FTPing all the website down to my hard drive and back up again, I have no idea of how to move the site. (And doing it that way is a collasal PITA.)

    I know it's possible to use telnet to tarball the whole thing up and move it to the new server, but I haven't the foggiest on how to do it. I need a tutorial on how to use telnet to do the things I need to do, or someone willing to show me. I'm simply sick thinking that Kathy and I will have to FTP all of this stuff down from the server and then FTP it all back .... changing all the permissions on our cgi files and stuff, too, when I know it took the last webhost about an hour to move everything from one server to the other using telnet. (and we were using about 120 MB of space at the time with the UBB)

    Can anyone help me?

    Susan

  • #2
    use telnet to get into the machine (you didn't say what type of desktop you are using): in window's it's Start Menu, Run, "telnet" in the run box.

    Telnet to the host, and login.

    Assuming your web directory is in "www", do this:

    tar cf site.tar www
    ^ ^ ^ ^- directory to archive
    | | |-------- file created during the operation
    | -------------- C.reate F.ile
    ------------------- command

    to compress the file, use:

    gzip -9 site.tar
    ^ ^ ^---- archive file
    | |--------- maximum compression
    |--------------- gzip command

    or, if they have "bzip2" then substitute it for gzip, because it is much better compression.

    Now, download the file to your computer. It might take a while. :/

    To untar, use:

    gzip -d site.tar.gz
    (skipping explanation, -d is for "dearchive")

    tar xf site.tar
    (skipping explanation, xf is for "extract file")

    substitute gzip for bzip2 if you used that.


    The SQL data is more complex. If you have to move it, I recommend the following steps - going quicker now that I have provided base context above.

    mysqldump -p -u<youruserid> <yourdbname> >db.data

    example:

    mysqldump -p -usteve vbulletin >db.data

    It should give you a file db.data

    Now use bzip2 -9 (or gzip) on db.data to get a small file.

    to reload the data,

    mysqladmin -p -u<youruserid> create <yourdbname>
    mysql -p -u<youruserid> <yourdbname> <db.data

    Clear as mud, right?
    http://racing.kos.net
    http://www.rumour.com/

    Comment


    • #3
      Argh. It munged some of the spacing. Sorry.
      http://racing.kos.net
      http://www.rumour.com/

      Comment

      Loading...
      Working...
      X