rsync to backup system code example
Example 1: rsync remotely
for working in windows subsystem for lynux enter the following:
rsync -r work_server:location_of_work /mnt/c/directory_to_store
Example 2: rsync backup
we use rsync to perform the backup process in Linux/UNIX.
$ rsync –zvr /home/linuxconcept/newweb/ /var/www/linuxconcept/
$ ls –l /home/linuxconcept/newweb/index.html /var/www/linuxconcept/index.html
$ rsync –zva /home/linuxconcept/newweb/ /var/www/linuxconcept/
$ rsync –v /etc/ssl/linuxconcept/pubkeys /home/linuxconcept/pubkeys
$ rsync -avz /root/temp/ [email protected]:/home/linuxconcept/temp/
$ rsync -avz [email protected]:/home/linuxconcept/satish /root/temp
$ rsync -avz -e ssh [email protected]:/home/linuxconcept/satish /root/temp
$ rsync -avzhe ssh –progress /home/linuxconcept [email protected]:/root/rpmpkgs
$ rsync –avz – -delete [email protected]:/home/linuxconcept/ .
$ rsync –avzhe ssh – -max-size=’400k’ /home/linuxconcept/satish/ [email protected]:/home/linuxconcept/tmp