User Tools

Site Tools


backups:synchronize_files_in_a_directory_between_2_hosts

This is an old revision of the document!


Backups - Synchronize files in a directory between 2 hosts

Synchronize files in a directory between 2 hosts using the program rsync.

host1's /disk01 (source) is the remote host and /disk01 (destination) is a local directory. The destination is always made to look like the source even if files need to be deleted in the destination (–delete). The source's data is never touched. The source is always named first and the destination is always named second. Trailing / on the source as means copy the contents of this directory to the destination. Without the trailing / on the source you get the directory name copied with all it's files in it. Below uses ssh as the remote-shell program as the transport. It also turns on the lowest grade encryption to speed up the transfer.

rsync -av --delete --rsh="ssh -c arcfour -l root" host1.domain.lan:/disk01/ /disk01/
backups/synchronize_files_in_a_directory_between_2_hosts.1468176226.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki