広告のパーソナライゼーション、リマーケティング、広告のパフォーマンス分析など、広告に使用されるクッキーを管理します。
5.23. Download site from VPS
There are several ways to download a site from a server:
- FTP — configuring an FTP server and downloading files to a PC.
- SFTP — downloading files to a PC without any additional configuration.
- SCP — copying files directly to another server without downloading them to your computer.
- rsync — copying files directly to another server without downloading them to a PC.
Important points:
- When using FTP or SFTP, data will be downloaded to the device, which means there is a risk of file corruption when transferring files from one device to another, as their integrity or encoding may be compromised, potentially causing significant inconvenience down the line.
- FTP is faster than SFTP or SCP (without compression). When transferring a large number of files, it will be noticeably faster at uploading or downloading data.
- FTP is less secure than SFTP, SCP, or rsync. It is strongly discouraged to use it on public networks.
- SCP (with compression) and rsync are much faster than FTP or SFTP, since data is transferred directly between servers without any intermediaries. This method is faster and more secure in terms of the integrity of the copied files.
- rsync is significantly faster and more flexible than SCP, but it can be quite complicated to set up, so for everyday tasks, it’s easier to use SCP.
- Install ProFTPd on the VPS.
- Connect to the server using any FTP client with the credentials of the user configured in ProFTPd.
- Go to the directory where the site is located (most often this will be the
/var/www/directory). - Download the necessary files.
- Connect to the server using any FTP client that supports SFTP, using the SSH credentials. When setting up the connection, be sure to select the SFTP protocol and port
22. - Go to the directory where the site is located (most often this will be the
/var/www/directory). - Download the necessary files.
- Connect to the server via SSH.
- Run the command to copy the files recursively:
scp -rC /var/www/example.com/* user@example.ftp.tools:~/example.com/Command description:
-r— copy files recursively in the specified directory, meaning that all files and subdirectories will be copied.-C— use compression for copying. This speeds up the copying process by minimizing data transfer. If you encounter issues with the files after copying, you should not use this option./var/www/example.com/— the directory you want to copy. Please note that you must include/*at the end of the path to copy the files without creating theexample.comdirectory. All contents of theexample.comdirectory will be copied to the new server.user@example.ftp.tools:~/example.com/— you need to specify SSH credentials and the target directory where the data will be copied:user— SSH user.example.ftp.tools— a server for connecting via SSH.~/example.com/— the destination directory where the data will be copied. It is important to note that~/refers to the default user directory, which is equivalent to/home/example/.
- After running the command, you may be prompted to add the target server's "fingerprint" key; type
yes. - After completing the steps described above, a blank field labeled "Password:" will appear; you must enter the password for the SSH user. Warning! When you type or paste the password from the clipboard, the characters will not appear on the screen.
- If all steps were performed correctly, a list of files copied to the other server will be displayed. The copying process is now complete; you should check the copied files on the new server.
- Connect to the server via SSH.
- Run the command to copy files recursively:
rsync -rvz /var/www/example.com/* user@example.ftp.tools:~/example.com/Command description:
-r— copy files recursively in the specified directory, meaning that all files and subdirectories will be copied.-v— detailed output of all actions performed during the copy process.-z— use compression for copying. This speeds up the copying process by minimizing data transfer. If you encounter issues with the files after copying, you should not use this option./var/www/example.com/— the directory you want to copy. Please note that you must include/*at the end of the path to copy the files without creating theexample.comdirectory. All contents of theexample.comdirectory will be copied to the new server.user@example.ftp.tools:~/example.com/— you need to specify SSH credentials and the target directory where the data will be copied:user— SSH user.example.ftp.tools— a server for connecting via SSH.~/example.com/— the destination directory where the data will be copied. It is important to note that~/refers to the default user directory, which is equivalent to/home/example/.
- After running the command, you may be prompted to add the target server's "fingerprint" key; type
yes. - After completing the steps described above, a blank field labeled "Password:" will appear; you must enter the password for the SSH user. Warning! When you type or paste the password from the clipboard, the characters will not appear on the screen.
- If all steps were performed correctly, a list of files copied to the other server will be displayed. The copying process is now complete; you should check the copied files on the new server.