G
G
gremlintv22017-08-04 20:13:16
linux
gremlintv2, 2017-08-04 20:13:16

How to quickly create a full backup of a remote system using tar and rsync/scp?

I googled, but I didn’t find a sensible line, I don’t have time, help me out, I’ve never done this

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Zhurkin, 2017-08-04
@gremlintv2

Here I answered
How to create an installable OS image, and what are the ways to clone servers?
in short, a
backup of the entire system
As an option, use --exclude=/all.tar.bz2 --one-file-system
Exclude all.tar.bz2 itself from packing again (although in theory it should not)
and do not reserve /proc /sys partitions -- -one-file-system
For understanding, read man or here
https://help.ubuntu.com/community/BackupYourSystem/TAR
Then transfer via ssh.
type
tar jcpf - [what to back up] | ssh [email protected] "cat > /where/to transfer/backupfile.tar.bz2"
True, there will be no transfer indication.
You can generally have tar pack ssh using compression and passing it on.

C
Cyclop, 2017-08-04
@Cyclop

rsync -a --exclude-from=file_name [email protected]:/ /path_to
Where file_name is the name of the file with exceptions that do not need to be rewritten
user - user of the remote computer
IP -remote computer
This is if without packaging.
packaging on local machine
tar czpf name.tar.gz --exclude-from=file_name /
file transfer
scp file_name [email protected]:/path_to
nothing extraordinary

M
moropsk, 2017-08-05
@moropsk

Why backup the entire system?
You can only need:
/etc
/your scripts
/crontab
/list of installed packages
/var/www/your site
https://serveradmin.ru/bekap-sayta-wordpress-na-ya...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question