W
W
WebforSelf2021-09-22 12:25:11
linux
WebforSelf, 2021-09-22 12:25:11

How to make a full site backup using rsync?

There is a heavy site, about 200 GB weighs, how to download its full backup from the server on Debian 10?
I read the options and realized that only rsync will help here. The only question is how to set up and where to start? I have a PC with a clean tin, I will install a local server later

Answer the question

In order to leave comments, you need to log in

6 answer(s)
V
Victor Taran, 2021-09-22
@WebforSelf

on the server where you transfer, create a daddymkdir /tmp/11

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

actually everything!
the site moved and already unpacked, the archive did not take up space anywhere on either server, but nevertheless it was transmitted over the Internet in 1 file.
tar cvfz - /var/www/site.ru/- Archive daddy
|transfer
ssh [email protected]  "cd /tmp/ - на другой сервер

;tar xvfz -"unpack.
As a result, the site will be packed and transferred to a third-party server in an archive, that is, not in 1 file, but in an archive.
But it will be saved immediately on the other side, while each file will be immediately unpacked.
That is, it will be transferred at a transfer rate of 1 ffile (fast), but there will be no backup as such

K
ky0, 2021-09-22
@ky0

The question is too vague. What is the difficulty?
Decide what directories you need to backup, install any rsync client on a machine with a blank disk, start copying. Usually a site backup consists of two parts - files and a database. You can’t copy the database just like that, you need to make a dump.

S
shurshur, 2021-09-22
@shurshur

What is the problem? There is nowhere easier.
rsync -av --progress [email protected]:/path/to/site/ /local/directory/for/site/
(slashes at the end of paths needed)
You can compress on the fly by adding the -z switch.
If a break occurs, rsync will continue from the same place the next time it is run, and will also take into account files that have changed since then.

P
pfg21, 2021-09-22
@pfg21

you run rsync via ssh or via sshfs or whatever. articles in bulk.
plus rsync unlike for example cp is that it can confirm the usefulness of data transfer from one place to another.
for speed, you can copy cp, and then check the identity of the copy via rsync (by size, date, ideally by the hash of each file)

D
Drno, 2021-09-22
@Drno

Raise in the place where you copy ftp or sftp
Next - rsync

C
ComodoHacker, 2021-09-22
@ComodoHacker

If there is free space on the server, I would archive the data and download the archive, for example via FTP.
Pros:

  • Integrity control
  • Possibility to resume in case of unstable connection
  • Good speed (compared to rsync and sftp)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question