J
J
Julia Lis2021-11-07 17:25:01
linux
Julia Lis, 2021-11-07 17:25:01

How can I copy a site to a local PC from a server?

Good evening everyone, a question of such a plan.
I bought myself a small server on debian 10 to learn, and the following question arose.
My server has 15GB of space.
The site is 10GB. The question arose how to download it to the local computer. It's just on the PC, not on the server.
(but by the way, if you can download it to a local server on a PC, it’s also interesting)
So I won’t give a damn, you can of course install via SFTP to download, but it will download there for a couple of days ...
scp - I know that you can download from server to server.
Of course, the server will not let you archive, because there is practically no free space.
How do such volumes generally swing? if it is not possible to make a tar archive and download it via SFTP

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Karabanov, 2021-11-07
@karabanov

How to use rsync to copy files between Linux-...

F
fara_ib, 2021-11-07
@fara_ib

You gave an example of a site from which you installed a web server, and on this site in the blogs section there is an article https://itdraft.ru/2018/08/29/kopirovanija-sinhron...
(Copying (synchronizing) data from a remote server to a network storage (NAS)). Here is an example of copying.

V
Victor Taran, 2021-11-08
@shambler81

We create a folder where we upload the site on our computer
mkdir /tmp/site.ru
, we open port 22 on our computer to an external device, if you have a router, then do not forget to make port forwarding in it.

tar cvfz - /var/www/site.ru |ssh [email protected] "cd /tmp/site.ru;tar xvfz -"

On the server side, we do this one
where you specify the login password from your computer.
As a result, it will archive in a stream and send it via the channel immediately unpacking on the other side
. As a result, you will get all the pluses of copying 1 archive, but you will not get any 1 minus in particular of the archive itself.
The files will be archived and immediately sent to your computer immediately unpacked.
On the way, you will be asked for a password from your computer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question