Guest Posted April 22, 2003 Share Posted April 22, 2003 I have a site that I'm working on that I want to mirror on another domain...same product, images, layout, etc. I think I can figure out how to get the layout and so forth to come up ok but how do I go about moving the database so that all the information stays intact? My host uses cpanel and phpmyadmin 2.4.0. Any suggestions? Thanks! Shawn Link to comment Share on other sites More sharing options...
carlp Posted April 22, 2003 Share Posted April 22, 2003 Hi, You will need to backup the database in Tools > Backup in your admin pages. Copy the data across and insert the backup database :) Hope This helps. BTW, It does work, done it many a time. You will obviously need to change configure files :) Kindest Regards, Carl Pickering If there is light at the end of the tunnel, switch it off. I have to save on my electricity bill Link to comment Share on other sites More sharing options...
Daemonj Posted April 22, 2003 Share Posted April 22, 2003 Following are the steps that I use. It looks really rough but after the first time it is a piece of cake and can be done in under 15 minutes. In your old server: 1. telnet in 2. cd to the directory above from your root directory of your site i.e. if your root is /home/usr/public_html cd /home/user/ then tar the public_html directory tar cvf public_html.tar public_html then you'll have a file called public_html.tar that you can compress even more by using gzip: gzip -9 public_html.tar which will result in a file public_html.tar.gz Still in telnet, ftp domain or ip of new server and it will prompt for username and pwd of new server. cd to the new site's directory above the root cd /home/newserveruser/ then transfer site over with put command put public_html.tar.gz let that transfer over. Now the same can be done with your mysql databases starting in telnet on old server, just dump the mysql datbases into a .sql file. mysqldump --opt -u [database username] -p[database password] [database] > db_backup.sql which creates a file db_backup.sql that you need to archive: tar cv db_backup.tar db_backup.sql and compress: gzip -9 db_backup.sql.tar.gz and ftp the db_backup.sql.tar.gz file to your new server. On your new server, to uncompress your .tar.gz files you first need to decompress them: gzip -d [filename].tar.gz then unarchive them: tar xvf [filename].tar "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein Link to comment Share on other sites More sharing options...
carlp Posted April 23, 2003 Share Posted April 23, 2003 Following are the steps that I use. It looks really rough but after the first time it is a piece of cake and can be done in under 15 minutes. In your old server: 1. telnet in 2. cd to the directory above from your root directory of your site i.e. if your root is /home/usr/public_html cd /home/user/ then tar the public_html directory tar cvf public_html.tar public_html then you'll have a file called public_html.tar that you can compress even more by using gzip: gzip -9 public_html.tar which will result in a file public_html.tar.gz Still in telnet, ftp domain or ip of new server and it will prompt for username and pwd of new server. cd to the new site's directory above the root cd /home/newserveruser/ then transfer site over with put command put public_html.tar.gz let that transfer over. Now the same can be done with your mysql databases starting in telnet on old server, just dump the mysql datbases into a .sql file. mysqldump --opt -u [database username] -p[database password] [database] > db_backup.sql which creates a file db_backup.sql that you need to archive: tar cv db_backup.tar db_backup.sql and compress: gzip -9 db_backup.sql.tar.gz and ftp the db_backup.sql.tar.gz file to your new server. On your new server, to uncompress your .tar.gz files you first need to decompress them: gzip -d [filename].tar.gz then unarchive them: tar xvf [filename].tar Jim, Thats a cool way of doing it, but that is for more the sys admin then just a basic user of OSCommerce. Agree? But still very good, I have made a note of this, cos I do need to do a new backup actually Kindest Regards, Carl Pickering If there is light at the end of the tunnel, switch it off. I have to save on my electricity bill Link to comment Share on other sites More sharing options...
Daemonj Posted April 23, 2003 Share Posted April 23, 2003 Yeah, I would agree that the steps that I provided are more for a sys admin or a developer. I make all modifications on my local box and then transfer everything up to my server for the customer to inspect. Once the changes are approved, I transfer the information to their site. The steps that I listed make my life much easier but are certainly more than what the "typical" osC'er can handle/need. I just wanted to provide the information in the hopes of helping out. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.