de:server:services:rsync

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
de:server:services:rsync [2022/09/03 00:16] – removed - external edit (Unknown date) 127.0.0.1de:server:services:rsync [2022/10/24 08:24] – external edit 127.0.0.1
Line 1: Line 1:
 +====== rsync ======
  
 +rsync ist ein Open-Source-Dienstprogramm, das eine schnelle inkrementelle Dateiübertragung ermöglicht. rsync ist unter der [[https://rsync.samba.org/GPL.html|GNU General Public License]] frei verfügbar.
 +
 +===== Paket =====
 +
 +<code>
 +pacman -S rsync
 +</code>
 +
 +
 +===== SSH =====
 +
 +
 +<code>
 +rsync --recursive --links --times --owner --group --itemize-changes --partial --progress --human-readable --verbose --stats /local/path user@host:~/path/
 +</code>
 +
 +**Von ssh nach lokal**:
 +<code>
 +rsync --recursive --links --times --owner --group --itemize-changes --partial --progress --human-readable --verbose --stats user@host:~/path/ /local/path
 +</code>
 +
 +**Kurz**:
 +<code>
 +rsync -rltogiPhv --stats /local/path user@host:~/path/
 +</code>
 +<code>
 +rsync -rltogiPhv --stats user@host:~/path/ /local/path
 +</code>
 +
 +**Anderer port**:
 +<code>
 +rsync -rltogiPhv --stats -e "ssh -p PORTNUMBER" /local/path user@host:~/path/
 +</code>
 +
 +Siehe, was jede Option bewirkt - https://man.archlinux.org/man/rsync.1#OPTION_SUMMARY
 +
 +
 +===== Daemon =====
 +
 +==== Anmeldeinformationen====
 +
 +<code>
 +echo "$user:$password" > /etc/rsyncd.secrets
 +chmod 400 /etc/rsyncd.secrets
 +</code>
 +
 +==== Konfiguration ====
 +
 +Ändere ''$user''.
 +
 +<code>
 +nano /etc/rsyncd.conf
 +</code>
 +<code>
 +[archive]
 +path = /path/
 +comment = Archive
 +timeout = 300
 +read only = false
 +# http user if you want to have access via web
 +#uid = 33
 +#gid = 33
 +# Run a script before and after a connection
 +#pre-xfer exec = /root/before_script.sh
 +#post-xfer exec = /root/after_script.sh
 +# Security
 +auth users = $user      
 +secrets file = /etc/rsyncd.secrets
 +# Optional
 +#hosts allow = 192.168.1.0/255.255.255.0
 +</code>
 +
 +==== Start ====
 +
 +<code>
 +systemctl enable --now rsyncd.service
 +</code>
 +
 +
 +==== Command ====
 +
 +Änder ''$DAEMONUSER'' und ''$DAEMONHOST''.
 +
 +<code>
 +rsync --rltogiPhv --stats /local/path rsync://$DAEMONUSER@$DAEMONHOST/archive/path/
 +</code>
 +
 +
 +===== Backup =====
 +
 +Gehe zu unserem [[de:backup:server#rsync|backup]] Tutorial.
  • de/server/services/rsync.txt
  • Last modified: 2024/04/30 22:02
  • by dan