kind.conf.5 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. .ds d \-\^\-
  2. .ds o \fR[\fP
  3. .ds c \fR]\fP
  4. .ds | \fR|\fP
  5. .ds bank \fIbank\fP
  6. .ds vault \fIvault\fP
  7. .ds branch \fIbranch\fP
  8. .ds image \fIimage\fP
  9. .de D
  10. \\.B \*d\\$1
  11. ..
  12. .de Dr
  13. \\.BR \*d\\$1 \\$2
  14. ..
  15. .de Bi
  16. \\.BR \\$1 \ =\ \\$2 " \fR\\$3"
  17. ..
  18. .de Br
  19. \\.BR "\\$1" " \\$2"
  20. ..
  21. .de DI
  22. \\.BI \*d\\$1 \\$2
  23. ..
  24. .de Di
  25. \\.BI \*d\\$1 " \\$2"
  26. ..
  27. .de See
  28. See \fB\\$1\fP for more details.
  29. ..
  30. .de SeeIn
  31. See \fB\\$1\fP in \fB\\$2\fP for more details.
  32. ..
  33. .de multiple
  34. Multiple \fB\\$1:\fP values will accumulate.
  35. ..
  36. .de default
  37. Default value: \fB\\$1\fP
  38. ..
  39. .TH kind.conf 5
  40. .SH NAME
  41. kind.conf \- kind configuration file format.
  42. .SH DESCRIPTION
  43. The configuration files provide all information neccesary for backup to kind.
  44. The file format is simple. Each line contains one value for one option.
  45. .BR "option=value"
  46. .br
  47. Using '=' as delimiter will set the option to this value
  48. and overwrite previous values.
  49. .BR "option+=value"
  50. .br
  51. Using '+=' as delimiter will add the specified value to the existing
  52. values. If in subsequent lines values for the same option are added,
  53. the key value (option) may be omited in the subsequent lines.
  54. .br
  55. \fB
  56. .in +.5i
  57. .nf
  58. option=value1
  59. .in +.5i
  60. +=value2
  61. +=value3
  62. \&.
  63. \&.
  64. \&.
  65. +=valueN
  66. .br
  67. .fi
  68. .in -1i
  69. \fR
  70. .br
  71. Each value must be provided on its own line.
  72. Any leading and trailing whitespace is discarded for keys and values.
  73. Blank lines and lines starting with '#' are ignored.
  74. On startup disu will first load a master configuration file
  75. .B /etc/d2/master.conf
  76. Each vault must have an own configuration file, which must specify
  77. at least the host and path to backup.
  78. .SH KIND OPTIONS
  79. Boolean values need to specified as
  80. .B true
  81. or
  82. .B false
  83. Specifying an boolean option with an empty value is also interpreted as true.
  84. Each option is marked here with one of (B) for Boolean, (S)
  85. single value, (L) list.
  86. .TP
  87. .Bi bank path (L)
  88. Specify paths to directories containing vaults.
  89. A \*[bank] is a directory containing one or more \*[vault]s.
  90. The system supports multiple \*[bank]s
  91. so that filesystem mount-points can be managed more effectively.
  92. When a \*[vault] is specified the \*[bank]s will be searched
  93. in list order until the \*[vault] is found.
  94. This way \*[vault]s can be moved between \*[bank]s
  95. or added without having to update a master index.
  96. .multiple bank
  97. .TP
  98. .Bi host hostname (S)
  99. specify a host from which to back up.
  100. .TP
  101. .Bi user username (S)
  102. specify a user for login on host.
  103. .TP
  104. .Bi path path (S)
  105. specify the path on host from which to back up. Use absolute path
  106. starting with '/'.
  107. .TP
  108. .Bi exclude pattern (L)
  109. Specify filename patterns to exclude.
  110. Patterns are based on shell glob with some enhancements.
  111. .See rsync(1)
  112. .multiple exclude
  113. .TP
  114. .Bi userExcludeFile excludefilename (S)
  115. Load a set of patterns from a file from host:path.
  116. .TP
  117. .Bi expireFailedImage time period (S)
  118. Time an failed image is kept. Time periods can be specified as multiple
  119. of sec, min, hour, day, week, month and year
  120. .TP
  121. .Bi expireRule expire-rule (L)
  122. specify rules for expiration.
  123. .See "EXPIRE RULES"
  124. .multiple expire\-rule
  125. .TP
  126. .Bi imageName name_of_images (S)
  127. Specify a name for the \*[image]. The name must
  128. not contain the '-' sign. The image name will
  129. be complemented by the image time like
  130. image\-2016-03-09-20.
  131. .TP
  132. .Bi longImageName true (B)
  133. Image time is added to the image name as YEAR-MONTH-DAY-hour.
  134. If longImageName is true the values for minute and second are added.
  135. .default false
  136. .TP
  137. .Bi ignorePermissions true (B)
  138. Ignore file permissions. If this is set permissions
  139. will not be checked or preserved.
  140. .See rsync(1)
  141. .default false
  142. .TP
  143. .Bi remoteShell command (S)
  144. Remote shell utility.
  145. This can be used to specify the location of
  146. .B ssh
  147. or
  148. .B rsh
  149. and/or to provide additional options for said utility
  150. such as
  151. .Bi \-p port
  152. for
  153. .B ssh
  154. to use an alternate port number.
  155. .default ssh
  156. This remote shell command will be used not only as the
  157. default rsync transport but also for loading user exclude file
  158. and find excludes.
  159. .TP
  160. .Bi rsyncOption option[s] (L)
  161. Specify additional options for the rsync command.
  162. This allows you to use rsync features that are not directly
  163. supported by kind.
  164. .multiple rsyncOption
  165. .TP
  166. .Bi group_??? vault (L)
  167. Specifies groups of vaults. If kind is called with a parameter
  168. as vault name like in "kind xyz", it first looks for a vaultgroup
  169. of this name. For this purpose a configuration option group_xyz is
  170. searched and the given list of vaults is then handled. All images
  171. created this way have the same image time.
  172. .SH EXPIRE RULES
  173. Expire rules is a list of rules used to determine an
  174. expiration time for an \*[image].
  175. The last rule that matches will apply so list order is significant.
  176. This allows rules to be set in master configuration and
  177. rules in \*[vault] configuration files will override rules set in the
  178. master configuration file.
  179. Each rule has an pattern expression against which the image
  180. time is compared followed by a time period specifier.
  181. Values for the image time pattern are hour, day of week, day of month
  182. and month. Each of these may be a single value or a '*', where '*'
  183. means "any value".
  184. Time periods for expiring may be given in seconds or multiple of
  185. minute, hour, day, week, month(=30 days) or year(=365 days).
  186. Here are examples of a expire\-rules:
  187. .nf
  188. .ft CR
  189. .ta .5i T 6m
  190. #hour DayOfWeek DayOfMonth Month EXPIRE
  191. * * 1 1 5 years
  192. * sunday * * 1 month
  193. * * 16 * 1 year
  194. 10 * * * 1 days
  195. .ft R
  196. .fi
  197. It should be noted that (if not disabled) after backup all images
  198. are compared to expire rules and last match gives expire period.
  199. If the expire date is reached, the image will be removed.
  200. .SH FILES
  201. .TP
  202. .B /etc/d2/master.conf
  203. default master configuration file.
  204. .TP
  205. .IB bank/vault/ d2/vault.conf
  206. default vault configuration file.
  207. .TP
  208. .IB bank/vault/image/ tree
  209. actual image of source directory tree.
  210. .TP
  211. .IB bank/vault/image/ rsync-log
  212. output from rsync
  213. .SH SEE ALSO
  214. .nf
  215. kind(8)
  216. ssh(1),
  217. rsync(1)
  218. .SH AUTHOR
  219. kind was created by Wolfgang Ortmann.
  220. .SH BUGS AND ISSUES
  221. It is important to distinguish '=' from '+='. '+' overrides
  222. previously given values while '+=' adds new values to lists.