A
A
Anton B2016-02-10 17:08:29
linux
Anton B, 2016-02-10 17:08:29

How to securely synchronize folders on two servers?

Hello.
Server A is the main, Server B is a replica.
I need one-way synchronization A -> B.
Now I use rsync, I would like to abandon it in favor of SFTP synchronization.
Who will tell you how to be?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
uvelichitel, 2016-02-10
@uvelichitel

Well, in principle, you can still git

M
Maxim Kovalenko, 2016-02-11
@maxxx_kovalenko

I advise you to use rsync over ssh.
sudo rsync -e 'ssh -p 22' --rsync-path='sudo rsync' -varzHAX --numeric-ids --delete [email protected]:/A /mnt/B
The backupuser user must have the required rights. Example at 192.168.1.1: /etc/sudoers

Defaults:backupuser !requiretty
backupuser ALL=NOPASSWD: /usr/bin/rsync

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question