tools: Add a interpolate function that can interpolate % variables into a path.
[matthijs/upstream/backupninja.git] / man / backup.d.5
index 5090051e34afb4b632e5805ccdfab6ad7c9318ba..80f0ce890b7c8abd54fa66b92505fb1c317afd9e 100644 (file)
@@ -97,6 +97,35 @@ The file format of the action configuration files is "ini style." Sections are c
    pear = no thanks \\
    i will not have a pear.
 
+.SH INTERPOLATION
+
+Some handlers will support path interpolation for some of their configuration variables. Interpolation allows you to give a config variable a different value, depending on the host or vserver it is used in. See the documentation for each handler for which variables are interpolated.
+
+The following interpolation variables are available:
+
+.IP %h
+The short hostname (output of `hostname -s`).
+
+.IP %h
+The full hostname (output of `hostname --fqdn`).
+
+.IP %n
+The name of the vserver running in, or the empty string when running on the host.
+
+.IP %N
+The name of the vserver running in, or "host" when running on the host.
+
+.IP %v
+The root direcotry of the vserver running in, or the empty string when running on the host.  
+
+.IP %%
+A literal %.
+
+For example, the following would backup the foo and bar vservers to /var/backups/foo and /var/backups/bar respectively.
+
+   backupdir = /var/backups/%n
+   vsnames   = foo bar
+
 .SH SEE ALSO
 .BR backupninja (1), 
 .BR ninjahelper (1),