Skip to content

ControllingAClient

Trac Migration edited this page May 18, 2019 · 1 revision

Controlling a Backup Client

The bbackupctl program sends control commands to the bbackupd daemon. It must be run as the same user as the daemon, and there is no exception for root.

The command line syntax is as follows:

/usr/local/sbin/bbackupctl [-q] [-c config-file] command

The -q option reduces the amount of output the program emits, and -c allows an alternative configuration file to be specified.

Valid commands are as follows:

  • terminate - stop the bbackupd daemon now (equivalent to kill)
  • reload - reload the configuration file (equivalent to kill -HUP)
  • sync - connect to the server and syncronise files now. (See below)

It communicates with the server via a UNIX domain socket, specified in bbackupd.conf with the CommandSocket directive. This does not need to be specified, and bbackupd will run without the command socket, but in this case bbackupctl will not be able to communicate with the daemon.

Some platforms cannot check the user ID of the connecting process, so this command socket becomes a denial of service security risk. bbackupd will warn you when it starts up if this is the case on your platform, and you should consider removing the CommandSocket directive on these platforms.

Using bbackupctl to Perform Snapshots

bbackupctl's main purpose is to implement snapshot based backups, emulating the behaviour of traditional backup software.

Use bbackupd-config to write a configuration file in snapshot mode, and then run the following command as a cron job:

/usr/local/sbin/bbackupctl -q sync

This will cause the backup daemon to upload all changed files immediately. bbackupctl will exit almost immediately, and will not output anything unless there is an error.

Clone this wiki locally