Posts

Showing posts from April, 2015

How to migrate Data for a Table from one DB to another DB through remote server? (Postgres , Mysql)

MySQL for whole DB  DB Backup:  mysqldump -u root -p [database_name] > dumpfilename.sql  DB  Restore:  mysql -u root -p [database_name] < dumpfilename.sql for a particular TABLE from a DB  Backup:  mysqldump -u root -p [database_name] [table_name] > dumpfilename.sql  Restore:  mysql -u root -p [database_name] < dumpfilename.sql PostgreSQL Here IP :192.168.1.36 Port :5433 User name : paras DB1 :kgp3_23apr15 DB2 :kgp6_23apr15 Create Back Up file for both Data Base . In Terminal. bishnu@bishnu:~$ /opt/PostgreSQL/9.0/bin/pg_dump -h 192.168.1.36 -p 5433 -U paras kgp3_23apr15 > kgp3_23apr15_24_bisnu.sql bishnu@bishnu:~$ /opt/PostgreSQL/9.0/bin/pg_dump -h 192.168.1.36 -p 5433 -U paras kgp6_23apr15 > kgp6_23apr15_24_bisnu.sql Back Up file name will generate like 'kgp3_23apr15_24_bisnu.sql' Back Up file name will generate like 'kgp6_23apr15_24_bisnu.sql' so that any time if we are doing any wrong migra...