Skip to main content
added 18 characters in body
Source Link
slm
  • 379.8k
  • 127
  • 793
  • 897

I'm not sure if you can have a file list in exclude option but you can try this:

$ rsync -avz --exclude delete_file_1.php --exclude dir_1/file4.txt \
     directory_source/ directory_destination/
or you can

or you can:

$ 
 rsync -avz --exclude 'dir_1/dir_2/file_3.php' source/ destination/
or you can

or you can:

$ 
 rsync -avz --exclude 'dir*' <-- wildcard match here

If I were you I'd create test folders to be synced to remote destination and see how it works out. As long as you have the exclude option correct you can manipulate it to exclude plenty of files.

I'm not sure if you can have a file list in exclude option but you can try this:

rsync -avz --exclude delete_file_1.php --exclude dir_1/file4.txt directory_source/ directory_destination/
or you can 
 rsync -avz --exclude 'dir_1/dir_2/file_3.php' source/ destination/
or you can 
 rsync -avz --exclude 'dir*' <-- wildcard match here

If I were you I'd create test folders to be synced to remote destination and see how it works out. As long as you have the exclude option correct you can manipulate it to exclude plenty of files.

I'm not sure if you can have a file list in exclude option but you can try this:

$ rsync -avz --exclude delete_file_1.php --exclude dir_1/file4.txt \
     directory_source/ directory_destination/

or you can:

$ rsync -avz --exclude 'dir_1/dir_2/file_3.php' source/ destination/

or you can:

$ rsync -avz --exclude 'dir*' <-- wildcard match here

If I were you I'd create test folders to be synced to remote destination and see how it works out. As long as you have the exclude option correct you can manipulate it to exclude plenty of files.

Source Link
unixmiah
  • 358
  • 1
  • 13

I'm not sure if you can have a file list in exclude option but you can try this:

rsync -avz --exclude delete_file_1.php --exclude dir_1/file4.txt directory_source/ directory_destination/
or you can 
rsync -avz --exclude 'dir_1/dir_2/file_3.php' source/ destination/
or you can 
rsync -avz --exclude 'dir*' <-- wildcard match here

If I were you I'd create test folders to be synced to remote destination and see how it works out. As long as you have the exclude option correct you can manipulate it to exclude plenty of files.