Excluding a type of files in rsync

Performing Rsync between two servers while excluding a type of files






I would like to show you today how to sync files between two servers while excluding a specific format of files.  

Scenario: We have two machines unixmate1 and unixmate2. A dir with data /unidb with two diff format of files, .data & .txt While sync I want .txt to be excluded.

  Step1: Create a dir on unixmate1; add some files with different extensions.

 


 Step2: Perform normal rsync and verify data is transferring on the whole on unixmate2. If properly done, let’s delete the dir for re-sync

  


 Step3: Resync with additional option --exclude=*.extension to exclude it from transfer. In our case we are going to exclude .txt

 

 Hope you have learnt a new thing and enjoyed. Do come back for more updates

Post a Comment

Previous Post Next Post