How to Transfer Files Between Remote Systems?

This article will assist you to transfer web content between two remote Linux machines.

cPanel to cPanel migration

cPanel provides you with the transfer tool to move your websites from other remote hosts. If both of your machines have cPanel installed, you can easily transfer the files between them. Refer to our knowledgebase article on how to migrate your website using cPanel's copy an account option.

If your existing cPanel accounts are hosted under shared hosting, your current web host may not allow cPanel to cPanel migration. In such cases, you can take backup of cPanel accounts and move backups through FTP. You may find this article helpful to transfer cPanel accounts manually.

Manual migration using SFTP

SFTP (SSH File Transfer Protocol or Secure File Transfer Protocol) offers secure connection to transfer files between Linux machines. SFTP is highly preferable over FTP because SFTP uses the SSH protocol to authenticate and establish a secure connection.

  • Connect to VPS using SFTP

    If you could connect to your VPS through SSH, then you have all necessary requirements to use SFTP. Connect to your VPS through sFTP via the following command.

    sftp username@IP_address_of_vps

    You will be prompted for the password, specify your SSH password and you will get connected to the remote system. This will also change shell prompt to SFTP. After connecting to your remote machine via SFTP, you can navigate to the remote machine file system using cd command.

    cd dir_name

    To know the current working directory pwd command is used. To view contents of the current directory ls command is used.

    phpinfo.php     info.html        Directory1      Directory2

    When you want to traverse the local file system, you can direct commands towards the local file system by just adding "l" before any command. For example; you can print the local working directory by command lpwd.

    Local working directory: /home/user/Desktop

    Similarly, we can list the contents of the current directory on the local machine using lls command and change the directory using lcd command.

  • Upload/Transfer local files to VPS

    You can upload/transfer local files to VPS using put command.

    put file_name
    Uploading file_name to /home/user/directory/file_name

    To copy an entire local directory to VPS, you can issue following command.

    put -r local_dir_name

  • Download VPS files to local computer

    Sometimes, you are required to download VPS files to local computer. It can be accomplished by issuing the following command.

    get file_name
    Fetching /home/user/Desktop/file_name to file_name

    If you want to copy whole directory along with its contents, issue following command.

    get -r remote_dir_name

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Fix :: FTP Error at FileZilla FTP Client : "Could not connect to server"

Problem Statement Getting an error after initialization of TLS in FileZilla Error Message FTP:...

How to manage DNS of addon domains in cPanel?

When you create the addon domain in cPanel, it will create the appropriate DNS zone for your new...

How Do I send .eml File in Emails?

If you are facing an error like "not allowed extension file" while you send .eml file in emails,...

What is parked domain?

Pointing one domain to another domain is called Domain Parking. Both Parked domain and Main...

Do you provide SFTP in Linux Shared Hosting Plans?

No. We do not provide SFTP (Secure FTP over SSH). However, we support, FTPS (FTP over explicit...