Thursday, March 28, 2013

postgresql backup and restore commands


Ubuntu:
Postgres Commands:

pg_dump -U username db_name > filename.sql

psql -U username -d db_name -f filename.sql


Windows:
psql.exe -U postgres -d development -f "d:db.sql"



Friday, March 1, 2013

Ubuntu is running in low-graphics mode


Ubuntu is running in low-graphics mode: 


Make sure the update runs to remove the previous repositories then:

sudo apt-get update

This will only download gdm to our archive, make sure the operation completes
 correctly before moving to the next step:

sudo apt-get -d install --reinstall gdm


When the package is being removed go ahead and stop xserver as the prompts says, then:

sudo apt-get remove --purge gdm

Now we have the new gdm installed with a new configuration, next we need to
 get rid of xgl and the associated files:

sudo apt-get install gdm

Then install the following:
sudo apt-get remove --purge xserver-xgl compiz compiz-plugins
 compiz-core compiz-manager csm cgwd cgwd-themes
And  

sudo apt-get install --reinstall compiz compiz-core
 compiz-fusion-plugins-extra compiz-fusion-plugins-main
 compiz-gnome compiz-plugins libcompizconfig0
Remove existing xorg using the following command

sudo apt-get remove --purge xserver-xorg

 Install xorg using the following command

 sudo apt-get install xserver-xorg

choose the driver 'ati' and when you get to monitor resolution choose the resolution you want to run and any resolution ABOVE that resolution should be removed. Once that is done issue the following:
   
sudo dpkg-reconfigure -phigh xserver-xorg
sudo reboot

 

Install Oracle Virtual Box on Ubuntu and Windows



Installing Oracle VirtualBox on Ubuntu:

1) Open Terminal (Alt-Ctrl-T).
2) Command 1:
wget -q 
http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | 
sudo apt-key add - 

    Command 2:
sudo sh -c 
'echo "deb http://download.virtualbox.org/virtualbox/debian precise contrib" 
>> /etc/apt/sources.list' 
 
  Command 3: 
 
sudo apt-get update && sudo apt-get install virtualbox-4.1.
 
sudo reboot;

If you get the below error are rebooting
 

"Ubuntu is running in low-graphics mode"



Then Click this link you will find Set of commands just execute them.
Thats It.
 
 

Installing Oracle VirtualBox on Windows:

 
Download VirtalBox exe from here 



Happy Coding...;-)