Chat now with support
Chat with Support

syslog-ng Store Box 5.3.0 - Administration Guide

Preface Introduction The concepts of SSB The Welcome Wizard and the first login Basic settings User management and access control Managing SSB Configuring message sources Storing messages on SSB Forwarding messages from SSB Log paths: routing and processing messages Configuring syslog-ng options Searching log messages Searching the internal messages of SSB Classifying messages with pattern databases The SSB RPC API Troubleshooting SSB Security checklist for configuring SSB About us Third-party contributions

Data and configuration backups

Backups create a snapshot of SSB's configuration or the data which can be used for recovery in case of errors. SSB can create automatic backups of its configuration and the stored logs to a remote server.

To configure backups, you first have to create a backup policy. Backup policies define the address of the backup server, which protocol to use to access it, and other parameters. SSB can be configured to use the Rsync, SMB/CIFS, and NFS protocols to access the backup server:

The different backup protocols assign different file ownerships to the files saved on the backup server. The owners of the backup files created using the different protocols are the following:

  • Rsync: The user provided on the web interface.

  • SMB/CIFS: The user provided on the web interface.

  • NFS: root with no-root-squash, nobody otherwise.

Caution:

SSB cannot modify the ownership of a file that already exists on the remote server. If you change the backup protocol but you use the same directory of the remote server to store the backups, make sure to adjust the ownership of the existing files according to the new protocol. Otherwise SSB cannot overwrite the files and the backup procedure fails.

Once you have configured a backup policy, set it as a system backup policy (for configuration backups) or data backup policy (for logspace backups):

NOTE:

Backup deletes all other data from the target directory, restoring a backup deletes all other data from SSB. For details on restoring configuration and data from backup, see Restoring SSB configuration and data.

Creating a backup policy using Rsync over SSH

The Rsync over SSH backup method connects the target server with SSH and executes the rsync UNIX command to copy the data to the remote server. SSB authenticates itself with a public key — password-based authentication is not supported.

Caution:

The backup server must run rsync version 3.0 or newer.

To create a backup policy using Rsync over SSH

  1. Navigate to Policies > Backup & Archive/Cleanup and click in the Backup policies section to create a new backup policy.

    Figure 35: Policies > Backup & Archive/Cleanup > Backup policies — Configure backup

  2. Enter a name for the backup policy (for example main-backup).

  3. Enter the time when the backup process should start into the Start time field in HH:MM format (for example 23:30).

  4. Enter the IP address or the hostname of the remote server into the Target server field (for example backup.example.com).

  1. Select Rsync over SSH from the Target settings radio buttons.

    Figure 36: Policies > Backup & Archive/Cleanup > Backup policies — Configure backup using rsync

  2. Enter the username used to logon to the remote server into the Username field.

  3. Click in the Authentication key field. A popup window is displayed.

  4. Generate a new keypair by clicking Generate or upload or paste an existing one. This key will be used to authenticate SSB on the remote server. The public key of this keypair must be imported to the remote server.

  5. Click in the Server host key field. A popup window is displayed.

  6. Click Query to download the host key of the server, or upload or paste the host key manually. SSB will compare the host key shown by the server to this key, and connect only if the two keys are identical.

    Figure 37: Policies > Backup & Archive/Cleanup > Backup policies > Rsync over SSH > Server host key — Configure SSH keys

  7. Enter the port number of the SSH server running on the remote machine into the Port field.

  8. Enter the path to the backup directory on the target server into the Path field (for example /backups).

    SSB saves all data into this directory, automatically creating subdirectories for logspaces. As a result of this, the same backup policy can be used for multiple logspaces. To ensure that a restore can be performed even if the logspace has been renamed, the subdirectories are created using a persistent internal ID of the logspace. To facilitate manual debugging, a text file is also saved in the directory with the name of the logspace, containing the internal ID for the logspace. This text file is only provided for troubleshooting purposes and is not used by SSB in any way.

  1. To receive e-mail notification of the backup, select the Send notification on errors only or the Send notification on all events option. Notifications are sent to the administrator e-mail address set on the Management tab.

    To include the list of files in the e-mail, select Send notification on all events and enable the Include file list option. However, note that if list is very long, the SSB web interface might become unaccessible. In this case, set the Maximum number of files in notification lower. After this number has been reached, file names will be omitted from the notification.

    NOTE:

    This e-mail notification is different from the one set on the Alerting & Monitoring tab. This notification is sent to the administrator's e-mail address, while the alerts are sent to the alert e-mail address (see Configuring system monitoring on SSB).

  2. Click Commit.

  3. To assign the backup policy to a logspace, see Creating data backups.

Creating a backup policy using SMB/CIFS

The SMB/CIFS backup method connects to a share on the target server with Server Message Block protocol. SMB/CIFS is mainly used on Microsoft Windows Networks.

NOTE:

Backup and archive policies only work with existing shares and subdirectories.

If a server has a share at, for example, archive and that directory is empty, when the user configures archive/ssb1 (or similar) as a backup/archive share, it will fail.

Caution:

The CIFS implementation of NetApp storage devices is not compatible with the CIFS implementation used in SSB, therefore it is not possible to create backups and archives from SSB to NetApp devices using the CIFS protocol (the operation fails with a similar error message: /opt/ssb/mnt/14719217504d41370514043/reports/2010": Permission denied (13) '2010/day/' rsync: failed to set times on).

To overcome this problem, either:

  • use the NFS protocol to access your NetApp devices, or

  • use a backup device that has a CIFS implementation compatible with SSB, for example, Windows or Linux Samba.

  1. Navigate to Policies > Backup & Archive/Cleanup and click in the Backup policies section to create a new backup policy.

    Figure 38: Policies > Backup & Archive/Cleanup > Backup policies — Configure backup

  2. Enter a name for the backup policy (for example main-backup).

  3. Enter the time when the backup process should start into the Start time field in HH:MM format (for example 23:30).

  4. Enter the IP address or the hostname of the remote server into the Target server field (for example backup.example.com).

  1. Select Target settings > SMB/CIFS.

    NOTE:

    From SSB version 5.2.0, SSB only supports SMB 2.1 and later. Make sure that your operating system with the Samba share that you want to mount, supports SMB 2.1 or later. Otherwise, SSB cannot mount the remote share.

    Figure 39: Policies > Backup & Archive/Cleanup > Backup policies — Configure backup via SMB/CIFS

  2. Enter the username used to logon to the remote server into the Username field, and corresponding password into the Password field.

    NOTE:

    NULL sessions (sessions without authentication) are not supported, authentication is required in all cases.

    NOTE:

    SSB accepts passwords that are not longer than 150 characters. The following special characters can be used: !"#$%&'()*+,-./:;<=>?@[]^-`{|}

  3. Enter the name of the share into the Share field.

    SSB saves all data into this directory, automatically creating the subdirectories. Backups of log files are stored in the data, configuration backups in the config subdirectory.

  4. Enter the domain name of the target server into the Domain field.

  1. To receive e-mail notification of the backup, select the Send notification on errors only or the Send notification on all events option. Notifications are sent to the administrator e-mail address set on the Management tab.

    To include the list of files in the e-mail, select Send notification on all events and enable the Include file list option. However, note that if list is very long, the SSB web interface might become unaccessible. In this case, set the Maximum number of files in notification lower. After this number has been reached, file names will be omitted from the notification.

    NOTE:

    This e-mail notification is different from the one set on the Alerting & Monitoring tab. This notification is sent to the administrator's e-mail address, while the alerts are sent to the alert e-mail address (see Configuring system monitoring on SSB).

  2. Click Commit.

  3. To assign the backup policy to a logspace, see Creating data backups.

Creating a backup policy using NFS

The NFS backup method connects to a shared directory of the target server with the Network File Share protocol.

NOTE:

Backup and archive policies only work with existing shares and subdirectories.

If a server has a share at, for example, archive and that directory is empty, when the user configures archive/ssb1 (or similar) as a backup/archive share, it will fail.

  1. Navigate to Policies > Backup & Archive/Cleanup and click in the Backup policies section to create a new backup policy.

    Figure 40: Policies > Backup & Archive/Cleanup > Backup policies — Configure backup

  2. Enter a name for the backup policy (for example main-backup).

  3. Enter the time when the backup process should start into the Start time field in HH:MM format (for example 23:30).

  4. Enter the IP address or the hostname of the remote server into the Target server field (for example backup.example.com).

  1. Select NFS from the Target settings radio buttons.

    Figure 41: Policies > Backup & Archive/Cleanup > Backup policies — Configure NFS backups

  2. Enter the domain name of the remote server into the Target server field.

  3. Enter the name of the NFS export into the Export field.

    SSB saves all data into this directory, automatically creating the subdirectories.

  4. The remote server must also be configured to accept backups from SSB.

    Add a line that corresponds to the settings of SSB to the /etc/exports file of the backup server. This line should contain the following parameters:

    • The path to the backup directory as set in the Export field of the SSB backup policy.

    • The IP address of the SSB interface that is used to access the remote server. For more information on the network interfaces of SSB, see Network settings.

    • The following parameters: (rw,no_root_squash,sync).

    Example: Configuring NFS on the remote server

    For example, if SSB connects the remote server from the 192.168.1.15 IP address and the data is saved into the /var/backups/SSB directory, add the following line to the /etc/exports file:

    /var/backups/SSB 192.168.1.15(rw,no_root_squash,sync)
  5. On the remote server, execute the following command:

    exportfs -a

    Verify that the rpc portmapper and rpc.statd applications are running.

  1. To receive e-mail notification of the backup, select the Send notification on errors only or the Send notification on all events option. Notifications are sent to the administrator e-mail address set on the Management tab.

    To include the list of files in the e-mail, select Send notification on all events and enable the Include file list option. However, note that if list is very long, the SSB web interface might become unaccessible. In this case, set the Maximum number of files in notification lower. After this number has been reached, file names will be omitted from the notification.

    NOTE:

    This e-mail notification is different from the one set on the Alerting & Monitoring tab. This notification is sent to the administrator's e-mail address, while the alerts are sent to the alert e-mail address (see Configuring system monitoring on SSB).

  2. Click Commit.

  3. To assign the backup policy to a logspace, see Creating data backups.

Related Documents