Ubuntu Linux, ubuntu desktop, Linux operating system, ubuntu guide

Archive for May, 2010

Mysql DB Backup and Restore How to

by on May.31, 2010, under Backup, RHEL5, Ubuntu, ubuntu 10.04, ubuntu 7.10, ubuntu 8.04, ubuntu 8.10, ubuntu 9.04, Ubuntu 9.10

Database Backup

If you’re storing anything in MySQL databases that you do not want to lose, it is very important to make regular backups of your data to protect it from loss. It is also a good idea to create a backup before making any major changes, incase something goes wrong and you need to revert to the unmodified version. Database backups can also be used to transfer your database from one server to another if you change web hosts.
Command Line (using mysqldump)
# mysqldump -u user_name -p your_password database_name > File_name.sql

Eg:
Let’s assume that:
Username: ubuntu
Password: jaunty
Database Name: ubuntulinux

# mysqldump -u ubuntu -p jaunty ubuntulinx> ubuntulinux.sql

This will backup the database to a file called ubuntulinux.sql

Back up more than one database
In this case you can use the –database option followed by the list of databases you would like to backup. Each database name has to be separated by space.
#mysqldump -u root -p –databases ubuntu ubuntulinux > data_backup.sql
Backup all Database
Back up all the databases in the server at one time you should use the –all-databases option. It tells MySQL to dump all the databases it has in storage.
#mysqldump -u root -p –all-databases > all_backup.sql

Database Backup From the phpMyAdmin

1. Login to phpMyAdmin
2. Click on your database name
3. Click on the tab labeled EXPORT
4. Select all tables you want to backup (usually all)
5. Default settings usually work, just make sure SQL is checked
6. Check the SAVE FILE AS box
7. Hit GO

Database Restore

Restore Database From the Command Prompt

If you are moving your data to a new server, or you have removed the old database completely you can restore it using the code below. This will only work if the database does not already exist:

#mysql – u user_name -p your_password database_name < file_name.sql

Or using our previous example

#mysql – u ubuntu -p jaunty ubuntulinux < ubuntuBackup.sql

If your database already exists and you are just restoring it, try this line instead:

#mysqlimport -u user_name -p your_password database_name file_name.sql

Or using our example again:

#mysqlimport -u ubuntu -p jaunty ubuntulinux ubuntuBackup.sql


Restore Database From the phpMyAdmin
  1. Login to phpMyAdmin
  2. Click on the tab labeled SQL
  3. Unclick the ‘show query here again’ box
  4. Choose your backup file
  5. Hit GO
4 Comments :, , , , , , more...

Kubuntu 9.10 Installation on Ubuntu Jaunty 9.04

by on May.30, 2010, under kubuntu, kubuntu 9.10, Ubuntu, ubuntu 10.04, ubuntu 7.10, ubuntu 8.04, ubuntu 8.10, ubuntu 9.04, Ubuntu 9.10

IMPORTANT NOTE: The packages for Jaunty are not officially supported. KDE 4.3 will be part of Karmic Koala Kubuntu 9.10 which will be officially released in October.
If you still want to continue, you can add these repositories by running the following command in a terminal:
#sudo sh -c “echo ‘deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu jaunty main’ >> /etc/apt/sources.list”
#sudo sh -c “echo ‘deb http://ppa.launchpad.net/kubuntu-ppa/staging/ubuntu jaunty main’ >> /etc/apt/sources.list”
Then add the GPG key:
#sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 8AC93F7A
And finally to upgrade to KDE 4.3:

#sudo aptitude update && sudo aptitude dist-upgrade

Or, if you don’t have KDE installed already:

#sudo aptitude install kubuntu-desktop

It is better to use ‘aptitude’ because if you don’t like your new desktop you can simply uninstall the packages with all its dependencies and you are back to the system state where you were before. That is not possible directly with apt-get (or synaptic etc.) (works with –purge but I find aptitude better, but let’s not get into a pointless discussion). But if you normally use apt-get, than use that instead of aptitude!

Removing KDE 4.3 from Jaunty
Removing KDE 4.3 from Jaunty and going back to 9.04 KDE version (4.2.2)
To revert back to the default KDE version in Kubuntu 9.04, you must firstly remove KDE entirely:
If you installed it using aptitude, not apt-get:

#sudo aptitude remove kubuntu-desktop

If you installed it using apt-get:

#sudo apt-get autoremove kde –purge

or

#sudo apt-get autoremove kubuntu-desktop -–purge

Then remove the newly added repositories press Alt + F2 on your keyboard and enter:

#gksu gedit /etc/apt/sources.list

and in this file, search for the 2 added repositories (from the beginning of this post) and remove them (they probably are at the bottom of the file). Then open a terminal and:

#sudo aptitude update && sudo aptitude install kubuntu-desktop

Leave a Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!