Using include/exclude options

Max Bowsher maxb at
Fri Jun 27 07:52:26 EST 2003

Jason Williams wrote:
> Hello everyone.
> I have a question about using the include/exclude function for rsync.
> What I am trying to do is backup specific directories and their
> corresponding data, while at the same time, excluding other directories.
> Specifically, I have a backup server with the follow setup:
> /backupstorage/D/...all the directories are here...there are roughly 18
> directories.
> So what I was trying to do was create a file that I can point to specify
> what directories I want backed up.
> Here is what I was attempting:
> rsync -avn --include-file=/home/rsyncfile /backupstorage/D/ /home/rsyncbak
> It is a dry run of course. However, it still wants to backup everything in
> the /backupstorage/D/.
> Here is a quick snip of what is in my rsyncfile:
> /backupstorage/D/1999 TaxReturns/
> /backupstorage/D/Appraisals/
> /backupstorage/D/CLOSED00/
> /backupstorage/D/CLOSED01/
> /backupstorage/CLOSED02/
> /backupstorage/D/CLOSED97/
> /backupstorage/D/CLOSED98/
> /backupstorage/D/CLOSED99/
> Im guessing that im not specifying correctly in the file.
> Anyone have any input on what im doing wrong?

The default is include. Since you haven't excluded anything, everything is
either included-explicitly or included-by-default.


More information about the rsync mailing list