We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

4.23. Download site from VPS

There are several ways to download a website from the server:

  • FTP - setting to FTP-servers and downloading files to PC.
  • SFTP - downloading files to a PC without additional settings.
  • SCP - copying files directly to another server without downloading files to a PC.
  • rsync - copying files directly to another server without downloading files to a PC.

Important points:

  • When working with FTP or SFTP data will be downloaded to the device, thereby there is a possibility of file corruption when transferring from device to device, as their integrity or encoding may be violated, which can lead to great inconvenience in the future.
  • FTP works faster than SFTP or SCP (without compression)... When transferring a large number of files, it will be noticeably faster to upload or download data.
  • FTP less secure than SFTP, SCP, or rsync. It is highly discouraged to use it on public networks.
  • SCP (using compression) and rsync is much faster FTP or SFTP, since data is transferred directly between servers without intermediaries. This transfer is faster and more secure in terms of the integrity of the copied files.
  • rsync is many times faster and more flexible than SCP, but it is quite difficult to create commands and it is better to use SCP for everyday tasks.
To download files using FTP, you need to configure FTP-server on VPS. To do this, you can use, for example, ProFTPd:
  1. Install ProFTPd on a VPS.
  2. Connect to the server using any FTPclientusing the data of the user configured in ProFTPd.
  3. Go to the directory where the site is hosted (most often this will be the directory /var/www/).
  4. Download all the files you need.
To download files using SFTP, you do not need to set up a separate server on the VPS, just do the following:
  1. Connect to the server using any FTPclientsupporting SFTP using SSH connection data... When setting up the connection, be sure to select the SFTP protocol and port 22.
  2. Go to the directory where the site is hosted (most often this will be the directory /var/www/).
  3. Download all the files you need.
To copy files using SCP, do the following:
  1. Connect to the server via SSH.
  2. If the copying will be performed on our hosting servers, then add to the list of allowed VPS IPv4 and IPv6 Addresses. (It can take up to 30 minutes for the list of allowed addresses to update.)
  3. Run the copy files command recursively:
    scp -rC /var/www/example.com/* user@example.ftp.tools:~/example.com/

    Command Description:

    • -r - copying files recursively in the specified directory, that is, all files and subdirectories will be copied.
    • -C - using compression for copying. Speeds up the copying process by minimizing traffic. If you have problems with the files after copying, then it should not be used.
    • /var/www/example.com/ - the directory to be copied. Please note that at the end of the path you must specify /* to copy files without creating a directory example.com... All contents of the directory will be copied to the new server example.com.
    • user@example.ftp.tools:~/example.com/ - you need to specify SSH connection data and the target directory where the data will be copied:
      • user - SSH user.
      • example.ftp.tools - server for connecting via SSH.
      • ~/example.com/ - the target directory to which the data will be copied. It is important to consider that ~/ indicates the standard location of the user's directory, that is, it is analogous /home/example/.
    1. After executing the command, you may be prompted to add a fingerprint key of the target server, enter yes.
    2. After performing the above actions, an empty field will appear with the indication “Password:", You must specify password from an SSH user. Attention! When you enter a password or paste it from the clipboard, characters are not displayed on the screen.
    3. If all actions were performed correctly, a list of files copied to another server will be displayed. This completes the copying process, it is worth checking the copied files on the new server.
To copy files using rsync, do the following:
  1. Connect to the server via SSH.
  2. If the copying will be performed on our hosting servers, then add to the list of allowed VPS IPv4 and IPv6 Addresses. (It can take up to 30 minutes for the list of allowed addresses to update.)
  3. Run the copy files command recursively:
    rsync -rvz /var/www/example.com/* user@example.ftp.tools:~/example.com/

    Command Description:

    • -r - copying files recursively in the specified directory, that is, all files and subdirectories will be copied.
    • -v - detailed output of all actions when copying.
    • -z - using compression for copying. Speeds up the copying process by minimizing traffic. If you have problems with the files after copying, then it should not be used.
    • /var/www/example.com/* - the directory to be copied. Please note that at the end of the path you must specify /* to copy files without creating a directory example.com... All contents of the directory will be copied to the new server example.com.
    • user@example.ftp.tools:~/example.com/ - you need to specify SSH connection data and the target directory where the data will be copied:
      • user - SSH user.
      • example.ftp.tools - server for connecting via SSH.
      • ~/example.com/ - the target directory to which the data will be copied. It is important to consider that ~/ indicates the standard location of the user's directory, that is, it is analogous /home/example/.
    1. After executing the command, you may be prompted to add a fingerprint key of the target server, enter yes.
    2. After performing the above actions, an empty field will appear with the indication “Password:", You must specify password from an SSH user. Attention! When you enter a password or paste it from the clipboard, characters are not displayed on the screen.
    3. If all actions were performed correctly, a list of files copied to another server will be displayed. This completes the copying process, it is worth checking the copied files on the new server.