User Tools

Site Tools


rsync

Helpfuls commands for RSYNC

For mirror a folder :

rsync -avuh --info=progress2 --delete SOURCE/ DESTINATION/

  • -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
  • -v : verbose
  • -u, –update skip files that are newer on the receiver
  • -h : human-readable, output numbers in a human-readable format
  • –info=progress2, show the progress pourcentage and time raimining
  • –delete option to delete files that are not there in source directory

Use of “/” at the end of path:

  • Source :

When using “/” at the end of source, rsync will copy the content of the last folder. When not using “/” at the end of source, rsync will copy the last folder and the content of the folder.

  • Destination :

When using “/” at the end of destination, rsync will paste the data inside the last folder. When not using “/” at the end of destination, rsync will create a folder with the last destination folder name and paste the data inside that folder


Source : don't remember


- created date : 2019.08.05 -

rsync.txt · Last modified: 2019/08/06 14:46 by admin