September 17, 200620 yr Hi everyone, As I have got my own server, I am thinking of moving all my sites over to my own server. How should I go about to transfer the database in MySQL to my new server? I heard that it is pretty simple but I would like to have some step by step guide, via cpanel. Anyone could give some pointers? Thanks greatly.
September 17, 200620 yr Hi IIegent, A new server! -what provider did you go with? Would be interested to hear, as i'm thinking getting a dedicated server soon. Ah, moving files is a piece of cake, ok a quick way to get started. If you have SSH/Shell access on your old host perform the following. Note: Below are some Shell/SSH commands you will be using. ll - Lists files and folders within your current directory cd - Change directory ie cd (folder name) so, cd public_html cd .. (goes back a directory) 1. Log into SSH, navigate to your root folder i.e public_html or www for instance, navigate within that folder and type. Step 1. Collaborating your files Navigate to your website root directory, with Plesk it's usually home/httpd/vhosts/(websitename)/httpdocs/ tar -cvf backup.tar * (the star indicates a wildcard and will store everything within that folder) Step 2. Compression gzip backup.tar (this will compress your backup.tar file and make it much smaller) Step 3. Transfering the Data Across This will work if you have a domain working on your old host or a dedicated i.p, no doubt you will have changed the dns to the new server. but if not, this will work fine, as the next step we will use will require a domain/i.p to transfer data from. Your now going to need to put the .tar.gz file into your new server, to do this log into your new server via ssh and navigate to the root of your website, again this is normally your /public_html or /www folder. Now to grab the backup from your old server/host type: wget http://www.yoururlhere.com/backup.tar.gz Step 4. Extracting Files on New Server. Log into your new server via SSH - again, navigate to the root of that particular website. Type: gunzip backup.tar.gz Then the file will be extrated to backup.tar, to extract type. tar xvf file_name.tar You have now transfered data from one web host to another. There's ton's of tutorials on this, but I thought i'd write my own, hope you understand it ok. Any probs, give me a shout Here's one I found earlier: Backing up your MySQL database: http://www.tizag.com/mysqlTutorial/mysqlbackup.php http://www.theprojects.org/tutorials/mysqldump.php Hope that helps. Ben
September 19, 200620 yr Very good step by step guide, really great. Ben I think you are working as a DBA anywhere LOL, I'm writing down this peice of cake for future use.
September 19, 200620 yr Very good step by step guide, really great. Ben I think you are working as a DBA anywhere LOL, I'm writing down this peice of cake for future use. He he! Your very welcome, it's all (I hope) pretty straight forward, i'm glad it helps!
September 19, 200620 yr Author Hi Ben, I really appreciate these guides! It really helps! I have signed up with NetWisp.com . The owner Hal is fast in support issue, a nice guys. I got my VPS Dedi (custom plan). So far has been good, I am likely to upgrade my Memory RAM further to handle to load. Ok, further to my ealier question, what should I do in order to create a back-up copy for all my sites (Data + Files + MySQL..etc --> A complete Back-up in that sense). I am thinking of creating a scehduled job via WHM to perform some sort like weekly back up. I was trying to create one via WHM, but it says something like /backup flder not found or sort. I am using VPZZ for my VPS (Linux). Should I also create a folder in the VPS? WHich location shall it be? Thanks...for a lot of questions!
September 20, 200620 yr That's great, fast support is really helpful, even if the person isn't the most intelligent in the world, knowing that you are treated as a human is always a good feeling
Create an account or sign in to comment