| 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
|---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 4 | <head> |
|---|
| 5 | <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" /> |
|---|
| 6 | <title>Controlling a backup client</title> |
|---|
| 7 | <link rel="stylesheet" href="bbstyles.css" type="text/css" /> |
|---|
| 8 | </head> |
|---|
| 9 | <body> |
|---|
| 10 | <div align="center"> |
|---|
| 11 | <div id="header"> |
|---|
| 12 | <div id="logo"> |
|---|
| 13 | <img src="images/bblogo.png" alt="logo" height="65" width="331" border="0" vspace="5" align="middle" /> <img src="images/stepahead.png" alt="a step ahead in data security" width="182" height="11" hspace="10" vspace="20" border="0" align="middle" /></div> |
|---|
| 14 | </div> |
|---|
| 15 | <div id="page"> |
|---|
| 16 | |
|---|
| 17 | <h1>Controlling a backup client</h1> |
|---|
| 18 | |
|---|
| 19 | <p>The <tt>bbackupctl</tt> program sends control commands to the <tt>bbackupd</tt> |
|---|
| 20 | daemon. It must be run as the same user as the daemon, and there is no exception for |
|---|
| 21 | root.</p> |
|---|
| 22 | |
|---|
| 23 | <p>The command line syntax is</p> |
|---|
| 24 | |
|---|
| 25 | <pre> |
|---|
| 26 | /usr/local/bin/bbackupctl [-q] [-c config-file] command |
|---|
| 27 | </pre> |
|---|
| 28 | |
|---|
| 29 | <p>The <tt>-q</tt> option reduces the amount of output the program emits, and |
|---|
| 30 | <tt>-c</tt> allows an alternative configuration file to be specified.</p> |
|---|
| 31 | |
|---|
| 32 | <p>Valid commands are</p> |
|---|
| 33 | |
|---|
| 34 | <dl> |
|---|
| 35 | <dt>terminate |
|---|
| 36 | <dd>Stop the <tt>bbackupd</tt> daemon now (equivalent to <tt>kill</tt>) |
|---|
| 37 | |
|---|
| 38 | <dt>reload |
|---|
| 39 | <dd>Reload the configuration file (equivalent to <tt>kill -HUP</tt>) |
|---|
| 40 | |
|---|
| 41 | <dt>sync |
|---|
| 42 | <dd>Connect to the server and syncronise files now. (See below) |
|---|
| 43 | </dl> |
|---|
| 44 | |
|---|
| 45 | <p>It communicates with the server via a UNIX domain socket, specified in |
|---|
| 46 | <tt>bbackupd.conf</tt> with the <tt>CommandSocket</tt> directive. This does not |
|---|
| 47 | need to be specified, and <tt>bbackupd</tt> will run without the command socket, |
|---|
| 48 | but in this case <tt>bbackupctl</tt> will not be able to communicate with the daemon.</p> |
|---|
| 49 | |
|---|
| 50 | <p>Some platforms cannot check the user id of the connecting process, so this |
|---|
| 51 | command socket becomes a denial of service security risk. <tt>bbackupd</tt> will |
|---|
| 52 | warn you when it starts up if this is the case on your platform, and you should |
|---|
| 53 | consider removing the <tt>CommandSocket</tt> directive on these platforms.</p> |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | <h2>Using bbackupctl to perform snapshots</h2> |
|---|
| 57 | |
|---|
| 58 | <p><tt>bbackupctl</tt>'s main purpose is to implement snapshot based backups, |
|---|
| 59 | emulating the behaviour of traditional backup software.</p> |
|---|
| 60 | |
|---|
| 61 | <p>Use <tt>bbackupd-config</tt> to write a configuration file in <tt>snapshot</tt> |
|---|
| 62 | mode, and then run the following command as a cron job.</p> |
|---|
| 63 | |
|---|
| 64 | <pre> |
|---|
| 65 | /usr/local/bin/bbackupctl -q sync |
|---|
| 66 | </pre> |
|---|
| 67 | |
|---|
| 68 | <p>This will cause the backup daemon to upload all changed files immediately. |
|---|
| 69 | <tt>bbackupctl</tt> will exit almost immediately, and will not output anything |
|---|
| 70 | unless there is an error.</p> |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | <p> </p> |
|---|
| 74 | <p>© Ben Summers, 2003, 2004</p> |
|---|
| 75 | <p> </p> |
|---|
| 76 | </div> |
|---|
| 77 | </div> |
|---|
| 78 | </body> |
|---|
| 79 | </html> |
|---|