Reputation: 101
I want to develop a Rsync script to recursively copy the list of files/folders that are created on one server to another server. I'm using the below command to copy a particular file. However whether we can include a list of files that should be ignored while copying the files from source to destination.
rsync -av --include /sourcepath/* --exclude filename user@destinationserver:/destinationpath
Upvotes: 0
Views: 101
Reputation: 101
We can refer [1] [1]: https://www.tutorialspoint.com/unix_commands/rsync.html
rsync -lapv --include /sourcecpath/* --exclude-from exclude-list-one user@destinationserver:/destinationpath
-l, --links copy symlinks as symlinks -a, --archive archive mode; same as -rlptgoD (no -H) -v, --verbose increase verbosity -p, --perms preserve permissions --exclude-from=FILE read exclude patterns from FILE
Upvotes: 0