Category: Linux

MySQL Dump and Restore 0

MySQL Backup, Files Transfer Using scp, Restore Database

Do you ever move 2GB or 20GB files and databases from one linux host to another? I do.

If you have SSH/secure shell access to your both hosts then this is the way to do it super fast:

  1. Backup your database using this command line:
    mysqldump --opt -h localhost -u dbusername -ppassword databasename > backup.sql
  2. Move your public_html files using scp command:
    scp public_html.tgz username@my.server.ip.address.com:/home/username/mydomain.com/
    And then uncompress it
  3. Move your backup.sql to the new host:
    scp backup.sql username@my.server.ip.address.com:/home/username/mydomain.com/
  4. Restore your database using this command in the new host:
    mysql -h localhost -u dbusername -ppassword databasename < backup.sql

... read more

0

My Favourite Shell Prompt

Do you have any favourite shell/bash prompt?

This is mine until this article is written. You can try this by editing your .bashrc file.

export PS1="\[\e[32;1m\]\u\[\e[0m\]\[\e[32m\]@\h\[\e[36m\] \$PWD\n\[\e[33m\]\$ \[\e[0m\]"

This post is here because I’m tired of losing my modified shell prompt. Thanks to all linux coders around the world! 🙂

psybnc 0

PsyBNC Installation on Ubuntu Hardy

I used these steps for my new vps about a month ago. These are the exact steps to install and to run a psyBNC on your Ubuntu Hardy machine. They also can be used for Debian machine.

Okay, these are the steps:

Download the latest version of psybnc:

$ wget http://www.psybnc.at/download/beta/psyBNC-2.3.2-7.tar.gz

Extract it:

$ tar -zxvf psyBNC-2.3.2-7.tar.gz

After the extraction process, you’ll see a new folder called ‘psybnc’. Get into it:

$ cd psybnc

Now let’s move into the big step… 🙂

... read more