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

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@192.168.0.101:/home/
rsync -avzh root@192.168.0.100:/home/tarunika/rpmpkgs /tmp/myrpms
Rsync Over SSH
rsync -avzhe ssh root@192.168.0.100:/root/install.log /tmp/
rsync -avzhe ssh backup.tar root@192.168.0.100:/backups/
Show Progress While Transferring Data with rsync
rsync -avzhe ssh --progress /home/rpmpkgs root@192.168.0.100:/root/rpmpkgs
Automatically Delete source Files after successful Transfer
rsync --remove-source-files -zvh backup.tar /tmp/backups/

 

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