Меню Затваряне

Rsync Command in Linux

rsync options source destination
  1. -v : verbose
  2. -r : copies data recursively (but don’t preserve timestamps and permission while transferring data
  3. -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
  4. -z : compress file data
  5. -h : human-readable, output numbers in a human-readable format
Copy/Sync Files and Directory Locally
rsync -zvh backup.tar /tmp/backups/
rsync -avzh /root/rpmpkgs /tmp/backups/
Copy a Directory from Local Server to a Remote Server
rsync -avz rpmpkgs/ root@
rsync -avzh root@ /tmp/myrpms
Rsync Over SSH
rsync -avzhe ssh root@ /tmp/
rsync -avzhe ssh backup.tar root@
Show Progress While Transferring Data with rsync
rsync -avzhe ssh --progress /home/rpmpkgs root@
Automatically Delete source Files after successful Transfer
rsync --remove-source-files -zvh backup.tar /tmp/backups/


Вашият коментар