Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. #created by francois scheurer on 20120828
  2. #
  3. #note:
  4. # -be careful with trailing spaces, '- * ' is different from '- *'
  5. # -rsync stops at first matched rule and ignore the rest
  6. # -rsync descends iteratively the folders-arborescence
  7. # -'**' matches also zero, one or several '/'
  8. # -get the list of all root files/folders
  9. # pdsh -f 1 -w server[1-22] 'ls -la / | sed -e "s/ */ /g" | cut -d" " -f9-' | cut -d" " -f2- | sort -u
  10. # -include all folders with '+ */' (missing this rule implies that '- *' will override all the inclusions of any subfolders)
  11. # -exclude all non explicited files with '- *'
  12. # -exclude everything except /etc/ssh: '+ /etc/ssh/** \ + */ \ - *'
  13. # -exclude content of /tmp but include foldername: '- /tmp/* \ + */'
  14. # -exclude content and also foldername /tmp: '- /tmp/ \ + */'
  15. # -exclude content of each .ssh but include foldername: '- /**/.ssh/* \ + */'
  16. #
  17. #include everything except /tmp/:
  18. #- /tmp/
  19. #same but include /tmp/ as an empty folder:
  20. #- /tmp/*
  21. #include only /var/www/:
  22. #+ /var/
  23. #+ /var/www/
  24. #+ /var/www/**
  25. #- *
  26. #same but also include folder structure:
  27. #+ /var/www/**
  28. #+ */
  29. #- *
  30.  
  31.  
  32.  
  33.  
  34. #pattern list for / (include by default):
  35. + /
  36.  
  37. #+ /boot/
  38. #+ /boot/**
  39. #- *
  40.  
  41. - /lost+found/*
  42. - /*.bak*
  43. - /*.old*
  44. #- /backup/*
  45. #- /boot/*
  46. #- /etc/ssh/ssh_host*
  47. #- /home/*
  48. - /media/*
  49. #- /mnt/*/*
  50. #- /opt/*
  51. #- /opt/fedora*/data/*
  52. #- /opt/fedora*/lucene/*
  53. - /opt/fedora*/tomcat*/logs/*
  54. - /opt/fedora*/tomcat*/temp/*
  55. - /opt/fedora*/tomcat*/work/*
  56. - /opt/old/*
  57. - /proc/*
  58. - /root/old/*
  59. #- /root/.bash_history
  60. - /root/.mc/*
  61. #- /root/.ssh/*openssh*
  62. - /root/.viminfo
  63. - /root/tmp/*
  64. #- /srv/*
  65. - /sys/*
  66. - /tmp/*
  67. #- /usr/local/franz/logstat/logstat.log
  68. - /var/cache/*
  69. - /var/lib/mysql/*/*
  70. - /var/lib/postgresql/*/main/wal_archive/*
  71. - /var/lib/postgresql/*/main/pg_log/*
  72. #- /var/lib/postgresql/*/main/pg_xlog/*
  73. - /var/lib/postgresql/*/main/postmaster.opts
  74. - /var/lib/postgresql/*/main/postmaster.pid
  75. - /var/lib/postgresql/*/main/backup_in_progress
  76. - /var/lib/postgresql/*/main/backup_label
  77. #- /var/lib/postgresql/*/main/*/*
  78. - /var/log/*
  79. #- /var/spool/*
  80. - /var/tmp/*
  81.  
  82. #pattern list for /backup/ and /mnt/ (exclude by default):
  83. + /backup/
  84. - /backup/lost+found/*
  85. - /backup/*.bak*
  86. - /backup/*.old*
  87. + /backup/snapshot/
  88. + /backup/snapshot/rsync/
  89. + /backup/snapshot/rsync/**
  90. - /backup/snapshot/*
  91. + /backup/db/
  92. - /backup/db/*
  93. - /backup/*
  94. - /mnt/*.bak*
  95. - /mnt/*.old*
  96. - /mnt/old/
  97. - /mnt/*/*.bak*
  98. - /mnt/*/*.old*
  99. - /mnt/*/old/
  100. + /mnt/sas/*
  101. + /mnt/ssd/*
  102. - /mnt/*/tmp/*
  103. #- /mnt/*/opt/*
  104. #- /mnt/*/opt/fedora*/data/*
  105. #- /mnt/*/opt/fedora*/lucene/*
  106. - /mnt/*/opt/fedora*/tomcat*/logs/*
  107. - /mnt/*/opt/fedora*/tomcat*/temp/*
  108. - /mnt/*/opt/fedora*/tomcat*/work/*
  109. - /mnt/*/opt/old/*
  110. - /mnt/*/postgresql/*/main/wal_archive/*
  111. - /mnt/*/postgresql/*/main/pg_log/*
  112. #- /mnt/*/postgresql/*/main/pg_xlog/*
  113. - /mnt/*/postgresql/*/main/postmaster.opts
  114. - /mnt/*/postgresql/*/main/postmaster.pid
  115. - /mnt/*/postgresql/*/main/backup_in_progress
  116. - /mnt/*/postgresql/*/main/backup_label
  117. #- /mnt/*/postgresql/*/main/*/*
  118. + /mnt/*/backup/
  119. + /mnt/*/backup/snapshot/
  120. + /mnt/*/backup/snapshot/rsync/
  121. + /mnt/*/backup/snapshot/rsync/**
  122. - /mnt/*/backup/snapshot/*
  123. + /mnt/*/backup/db/
  124. - /mnt/*/backup/db/*
  125. - /mnt/*/backup/*
  126. - /mnt/*/*
  127. + /c/
  128. + /c/backup/
  129. + /c/backup/snapshot/
  130. + /c/backup/snapshot/rsync/
  131. + /c/backup/snapshot/rsync/**
  132. - /c/backup/snapshot/*
  133. + /c/backup/db/
  134. - /c/backup/*
  135. - /c/*/*
  136. + /home/
  137. + /home/backup/
  138. + /home/backup/snapshot/
  139. + /home/backup/snapshot/rsync/
  140. + /home/backup/snapshot/rsync/**
  141. - /home/backup/snapshot/*
  142. + /home/backup/db/
  143. - /home/backup/*
  144. - /USB/*
  145.  
  146. #pattern list for /boot/ (include by default):
  147. + /boot/
  148. - /boot/lost+found/*
  149. - /boot/*.bak*
  150. - /boot/*.old*
  151. + /boot/**
  152.  
  153. #pattern list for /home/ (include by default):
  154. + /home/
  155. - /home/lost+found/*
  156. - /home/*.bak*
  157. - /home/*.old*
  158. - /home/xen/*
  159. + /home/**
  160.  
  161. #include folder structure by default:
  162. #+ */
  163. #include everything by default:
  164. + *
  165. #exclude everything by default:
  166. #- *
  167. #eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement