kind.conf.5 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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 kind will first load a master configuration file
  75. .B /etc/kind/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. kind 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 to back up from using ssh.
  100. .TP
  101. .Bi server hostname (S)
  102. specify a host running rsync as server to backup from.
  103. .TP
  104. .Bi user username (S)
  105. specify a user for login on client.
  106. .TP
  107. .Bi path path (S)
  108. specify the path on client from which to back up. Use absolute path
  109. starting with '/'.
  110. .TP
  111. .Bi exclude pattern (L)
  112. Specify filename patterns to exclude.
  113. Patterns are based on shell glob with some enhancements.
  114. .See rsync(1)
  115. .multiple exclude
  116. .TP
  117. .Bi userExcludeFile excludefilename (S)
  118. Load a set of patterns from a file from client.
  119. .TP
  120. .Bi expireFailedImage time period (S)
  121. Time an failed image is kept. Time periods can be specified as multiple
  122. of sec, min, hour, day, week, month and year
  123. .TP
  124. .Bi expireRule expire-rule (L)
  125. specify rules for expiration.
  126. .See "EXPIRE RULES"
  127. .multiple expire\-rule
  128. .TP
  129. .Bi setRule backup set rule (L)
  130. This defines a backup set, which is another way to describe images and
  131. their lifetime.
  132. .See "BACKUP SETS"
  133. .TP
  134. .Bi imageName name_of_images (S)
  135. Specify a name for the \*[image]. The name must
  136. not contain the '-' sign. The image name will
  137. be complemented by the image time like
  138. image\-2016-03-09-20.
  139. .TP
  140. .Bi longImageName true (B)
  141. Normally Image time is added to the image name as YEAR-MONTH-DAY-hour.
  142. If longImageName is true the values for minute and second are added.
  143. .default false
  144. .TP
  145. .Bi ignorePermissions true (B)
  146. Ignore file permissions. If this is set permissions
  147. will not be checked or preserved.
  148. .See rsync(1)
  149. .default false
  150. .TP
  151. .Bi remoteShell command (S)
  152. Remote shell utility.
  153. This can be used to specify the location of
  154. .B ssh
  155. or
  156. .B rsh
  157. and/or to provide additional options like in
  158. .Bi ssh \-p 2223
  159. to use ssh on an alternative port number.
  160. .default ssh
  161. This remote shell command will be used not only as the
  162. default rsync transport but also for loading user exclude file
  163. and find excludes.
  164. .TP
  165. .Bi rsyncOption option[s] (L)
  166. Specify additional options for the rsync command.
  167. This allows to use rsync features that are not directly
  168. supported by kind.
  169. .multiple rsyncOption
  170. .TP
  171. .Bi group_??? vault (L)
  172. Specifies groups of vaults. If kind is called with a parameter
  173. as vault name like in "kind xyz", it first looks for a vaultgroup
  174. of this name. For this purpose a configuration option group_xyz is
  175. searched and the given list of vaults is then handled. All images
  176. created this way have the same image time.
  177. .SH EXPIRE RULES
  178. Expire rules is a list of rules used to determine an
  179. expiration time for an \*[image].
  180. The last rule that matches will apply so list order is significant.
  181. This allows rules to be set in master configuration and
  182. rules in \*[vault] configuration files will override rules set in the
  183. master configuration file.
  184. Expire time is determined at time of creation. Image time is compared
  185. to a pattern defined in expire rules and if the image time matches,
  186. the rule is applied giving a lifetime of the image.
  187. Values for the image time pattern are hour, day of week, day of month
  188. and month. Each of these may be a single value, a range or a '*', where '*'
  189. means "any value".
  190. Values for weekday or month may be given as word like "monday" or "july".
  191. Ranges are given as 2-7, possibly extended by a distance like /2.
  192. E.g. 2-15/3 means values 2, 5, 8, 11, 14.
  193. Time periods for expiring may be given in seconds or multiple of
  194. minute, hour, day, week, month(=30 days) or year(=365 days).
  195. Here are examples of a expire\-rules:
  196. .nf
  197. .ft CR
  198. .ta .5i T 6m
  199. #hour DayOfWeek DayOfMonth Month EXPIRE
  200. expireRule = 20-5 * 1 1 5 years
  201. expireRule += * sunday * * 1 month
  202. expireRule += * * */7 * 1 year
  203. expireRule += 10 * * * 1 days
  204. .ft Rq
  205. .fi
  206. .SH BACKUP SETS
  207. Backup sets are another way to describe lifetime of images. It is
  208. possible to define a number of backup sets, e.g. as "daily", "weekly" and
  209. "monthly". A backup set has a value for then time between to backups
  210. and a value for the time to keep the images.
  211. This is given as
  212. .nf
  213. .ft CR
  214. .ta .5i T 6m
  215. # name rate keep
  216. setRule = daily: 1 day: 1 week
  217. setRule += weekly: 1 week: 1 months
  218. setRule += monthly: 1 month: 1 year
  219. .ft Rq
  220. .fi
  221. .SH FILES
  222. .TP
  223. .B /etc/kind/master.conf
  224. default master configuration file.
  225. .TP
  226. .B bank/vault/kind/vault.conf
  227. default vault configuration file.
  228. .TP
  229. .B bank/vault/image/tree
  230. actual image of source directory tree.
  231. .TP
  232. .B bank/vault/image/rsync-log
  233. output from rsync
  234. .SH SEE ALSO
  235. .nf
  236. kind(8)
  237. ssh(1),
  238. rsync(1)
  239. .SH AUTHOR
  240. kind was created by Wolfgang Ortmann.
  241. .SH BUGS AND ISSUES
  242. It is important to distinguish '=' from '+='. '+' overrides
  243. previously given values while '+=' adds new values to lists.