Find the answer to your Linux question:
Results 1 to 10 of 10
I'm not sure what database administration tool is on one of our servers that went down, but I have to back up the MySQL server since it went down. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie harner's Avatar
    Join Date
    Jun 2004
    Location
    PA, USA
    Posts
    209

    MySQL DB Backup


    I'm not sure what database administration tool is on one of our servers that went down, but I have to back up the MySQL server since it went down. I can SSH to it, and I'm transferring files to my workstation right now. However, I get errors that say some files cannot be found for whatever reason.

    The server was a POS, and hosted Nagios and a bunch of other cool stuff. So, how would I go about backuping up the databases? Can I do it manually or should I risk throwing something like phpMyAdmin on the webserver and pray for the best?
    I praise Webmin and PuTTy!
    Registered Linux User: 439431

  2. #2
    Linux User muha's Avatar
    Join Date
    Jan 2006
    Posts
    290
    Bit stupid to do it like this but ...
    login with ssh
    Code:
    mysqldump -u <username> -p <databasename> > <outputfile>
    It will ask for your password. You can also specify that behind -p
    Export a database from mysql to a local file (on that server).
    Logout ssh.

    Then copy it to your local location:
    Code:
    scp username@ssh.domain.com:./tmp/file.gz .
    Transferring a file from a remote machine to a local machine.

    Be sure to delete the remote copy, so it's not open to the internet afterwards
    Now what? You have Linux installed and running. The GUI is working fine, but you are getting tired of changing your desktop themes. You keep seeing this "terminal" thing. Don't worry, they'll show you what to do @
    <~ http://www.linuxcommand.org/ ~>

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Location
    (.)
    Posts
    69

  4. #4
    Linux Newbie harner's Avatar
    Join Date
    Jun 2004
    Location
    PA, USA
    Posts
    209
    Thanks, guys.
    I praise Webmin and PuTTy!
    Registered Linux User: 439431

  5. #5
    Linux User muha's Avatar
    Join Date
    Jan 2006
    Posts
    290
    @mitto: nice forum!
    In short it comes down to:
    mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]
    I forgot about the username-part before .... corrected it.
    Now what? You have Linux installed and running. The GUI is working fine, but you are getting tired of changing your desktop themes. You keep seeing this "terminal" thing. Don't worry, they'll show you what to do @
    <~ http://www.linuxcommand.org/ ~>

  6. #6
    Linux Newbie harner's Avatar
    Join Date
    Jun 2004
    Location
    PA, USA
    Posts
    209
    I was prompted for the username/password anyway. That looks easier for the next time, though!
    I praise Webmin and PuTTy!
    Registered Linux User: 439431

  7. #7
    Just Joined!
    Join Date
    Jun 2006
    Location
    (.)
    Posts
    69
    Thanks muha

  8. #8
    Just Joined! ram_88's Avatar
    Join Date
    Nov 2006
    Location
    /europe/sr/vojvodina/kishegyes
    Posts
    21
    Hi! I have the same problem. When i'm googled the net i found this:www.phpmybackuppro.net.
    Try it!

  9. #9
    Linux User muha's Avatar
    Join Date
    Jan 2006
    Posts
    290
    Hi ram_88, thanks for the link but always try to add some info when you post links. I thought you were a spambot
    Also, if we all only post links, the forum would become nothing more than links instead of useful information.
    Now what? You have Linux installed and running. The GUI is working fine, but you are getting tired of changing your desktop themes. You keep seeing this "terminal" thing. Don't worry, they'll show you what to do @
    <~ http://www.linuxcommand.org/ ~>

  10. #10
    Linux Newbie
    Join Date
    Dec 2006
    Posts
    105
    gr8 info but I think sometimes it's imp. to give urls for getting more information..
    Unix, Linux tips...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •