2

How do I manually migrate my domain to a private server?

 3 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/215945957-How-do-I-manually-migrate-my-domain-to-a-private-server-
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How do I manually migrate my domain to a private server?

Overview

This article explains how to move a domain from shared server to a private server, either a Virtual Private Server (VPS) or Dedicated Server manually by copying the domain data from shared hosting to the private server and then configuring the new user.

How to manually move a domain by copying your files

You can manually migrate your web files from your shared server to your private server in two ways:

Manually migrating files via FTP

If you have less than 1GB of files to move, it may be easier to use SFTP:

  1. Connect to your shared web server using instructions from the FTP article.
  2. Download all content from your website to your local computer.
  3. Create a new user on the private server. Visit the Enabling Shell Access article for details.
  4. Connect to your new server.
    • The hostname for a VPS is psXXXX.dreamhostps.com.
    • The hostname for a Dedicated Server is dsXXXX.dreamservers.com.
  5. Use the new username and password that was created for the user on the private server.
  6. Upload the website files for your domain to the private server into the domain’s directory.

Manually migrating files via rsync

In the following examples, shareduser and vpsuser would be your Shell users and example.com your website.

  1. Create a new user on the private server. Visit the Creating a user with Shell (SSH) access article for details on how to create this user.
  2. Find the full path to your new private server and its new user.
    • For example, if your private server is named ps9123456 and the new user you created is named vpsuser, the path to the private server is:
    [email protected]:/home/vpsuser With this information, you are ready to run the following rsync command.
  3. Log into your shared server via SSH.
  4. Run the following command to copy your data from your shared user to your new private server user. Be sure to change /example.com to your actual domain’s web directory:
    [server]$ rsync -e ssh -av /home/shareduser/example.com [email protected]:/home/vpsuser/
    After you run the command, you are prompted for the private server user's password.
  5. Click Enter to continue with the rsync.

There are three parts to this command:

  • rsync -e ssh -av
  • /path to shared domain folder
  • /path to private server user

DO NOT put a trailing slash after the path to the shared domain folder. Doing so only copies the contents inside this folder and not the folder itself.

Once complete, your shared domain’s folder and all of its contents are copied to your private server's user.

The final step is to adjust which username is assigned to the domain in your panel. View the Moving a single domain from shared hosting to a private server article for instructions. There are two differences this time, however:

  • There is no need to create a user, as it already exists. Just select the private server user from the dropdown menu which you’ve already created.
  • Leave the checkbox Move files to a new user? disabled.

DNS propagation after you migrate from a shared server to a private server

When you move your domain from a shared server to a private server, the IP of your site changes. If your domain is using DreamHost’s nameservers, then the domain’s IP is updated automatically.

If your domain is not using DreamHost’s nameservers, you’ll need to update your DNS records manually at the company where your nameservers are hosted.

You can see all of the DNS records that are set up for any site you host at DreamHost in your panel. Please note that after any DNS change, the records must propagate online.

Visit the following articles for more information:

See also

Did this article answer your questions?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK