Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question