From Network Security Wiki
Jump to navigation Jump to search


Rsync instance need to be installed on both server & client for rsync to work.


  • Synchronize Two Directories in a Local Server
rsync -zvr /var/opt/installation/inventory/ /root/temp
  • Synchronize Only One File
rsync -v /var/lib/rpm/Pubkeys /root/temp/
  • Synchronize Files From Local to Remote
rsync -avz /root/temp/ thegeekstuff@
  • Synchronize Files From Remote to Local
rsync -avz thegeekstuff@ /root/temp
  • Remote shell for Synchronization
rsync -avz -e ssh thegeekstuff@ /root/temp
  • Do Not Overwrite the Modified Files at the Destination
rsync -avzu thegeekstuff@ /root/temp
  • Synchronize only the Directory Tree Structure (not the files)
rsync -v -d thegeekstuff@ .
  • View the rsync Progress during Transfer
rsync -avz --progress thegeekstuff@ /root/temp/
  • Delete the Files Created at the Target
rsync -avz --delete thegeekstuff@ .
  • View the Changes Between Source and Destination
rsync -avzi thegeekstuff@ /root/temp/
  • Include and Exclude Pattern during File Transfer
rsync -avz --include 'P*' --exclude '*' thegeekstuff@ /root/temp/
  • Do Not Transfer Large Files
rsync -avz --max-size='100K' thegeekstuff@ /root/temp/
  • Transfer the Whole File
rsync -avzW  thegeekstuff@ /root/temp
  • Rsync between Ubuntu and Windows
sudo apt-get install smbfs
sudo mount -t smbfs //LASTXP21/Data /mnt/data -o username=administrator,password=,rw
pkexec rsync -r -t -v --progress --ignore-existing -u -s /data/.personal/shotwell/ /mnt/data/Shotwell

blog comments powered by Disqus