From 43134a50655d522b8167ea239716670842c5d361 Mon Sep 17 00:00:00 2001 From: ORG-wiki Date: Sat, 3 Sep 2022 12:16:35 +1200 Subject: [PATCH] Wiki page rsync changed with summary [] by Krause --- pages/de/server/services/rsync.txt | 93 ++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 pages/de/server/services/rsync.txt diff --git a/pages/de/server/services/rsync.txt b/pages/de/server/services/rsync.txt new file mode 100644 index 0000000..cb6cee8 --- /dev/null +++ b/pages/de/server/services/rsync.txt @@ -0,0 +1,93 @@ +====== 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 ===== + + +pacman -S rsync + + + +===== SSH ===== + + + +rsync --recursive --links --times --owner --group --itemize-changes --partial --progress --human-readable --verbose --stats /local/path user@host:~/path/ + + +**Von ssh nach lokal**: + +rsync --recursive --links --times --owner --group --itemize-changes --partial --progress --human-readable --verbose --stats user@host:~/path/ /local/path + + +**Kurz**: + +rsync -rltogiPhv --stats /local/path user@host:~/path/ + + +rsync -rltogiPhv --stats user@host:~/path/ /local/path + + +**Anderer port**: + +rsync -rltogiPhv --stats -e "ssh -p PORTNUMBER" /local/path user@host:~/path/ + + +Siehe, was jede Option bewirkt - https://man.archlinux.org/man/rsync.1#OPTION_SUMMARY + + +===== Daemon ===== + +==== Anmeldeinformationen==== + + +echo "$user:$password" > /etc/rsyncd.secrets +chmod 400 /etc/rsyncd.secrets + + +==== Konfiguration ==== + +Ändere ''$user''. + + +nano /etc/rsyncd.conf + + +[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 + + +==== Start ==== + + +systemctl enable --now rsyncd.service + + + +==== Command ==== + +Änder ''$DAEMONUSER'' und ''$DAEMONHOST''. + + +rsync --rltogiPhv --stats /local/path rsync://$DAEMONUSER@$DAEMONHOST/archive/path/ + + + +===== Backup ===== + +Gehe zu unserem [[de:backup:server#rsync|backup]] Tutorial. \ No newline at end of file