Fork me on GitHub

Advanced Exclude File Usage

This example assumes that you have set your backup path to “/” (root directory) on the source system. This example also assumes that you are running Mac OS X.

+ private     
+ private/etc/***
+ private/var/***
+ home/***
- *

Depending upon your system the example above may not work. It will depend upon the actual location of these files on your system.

However, please keep in mind that if you use this kind of approach for your backups then you may find that in a future release of LBackup the backup integrity check feature which is added will not work correctly.

Up until recently, I was not aware that the rsync excludes file could be used like this to add files as well as remove them. With that in mind, if you use this approach please check very carefully that all files you need to preserve are actually being backup.

Notes regarding each line of the example exclude file listed above :

  1. In this example, we have first specified a path for an excluded folder ( /private/etc/ssh_config/ )
  2. Next we specify a specific directory to include ( + private )
  3. Then a line specifies a folder and all contents of the sub folders ( + private/etc/*** )
    1. Note that the ssh_config directory will not be copied because of the previous exclude entry
  4. Following this add the /private/var/ directory and all contents of this directory and sub directories ( + private/var/*** )
  5. Next the home directory and all contents and sub directory contents is added to the include ( + home/*** )
  6. This final line excludes everything else from the backup which has not been specifically included ( - * )

If you have questions feel free to ask questions on the LBackup or rsync mailing lists.

Note : Mac OS X has a directory “/private/etc” and then this symbolically links this to “/etc/