rsync - exclude files and folders
First - define the files and folders you want to exclude from the rsync:
To do this create a file called ‘exclude.txt’ on the destination machine (the system you give the rsync command on):
pico /home/buddy/exclude.txt
Now we have defined what to exclude we can direct rsync to the file with:
–exclude-from ‘/home/buddy/exclude.txt’
The final command would be:
rsync -e ’ssh -p 2222′ -avl –delete –stats –progress –exclude-from ‘/home/buddy/exclude.txt’ root@192.168.1.1:/home/buddy /backup/
One Response to “rsync - exclude files and folders”
Leave a Reply
You must be logged in to post a comment.
1committees…
…