Create Bacula file storage#

To store Bacula backups, you need a properly configured Bacula storage. This is the destination where all backup data is written.

After installing Bacula, a default file storage will be available. However, this default storage may not be suitable for production use. This section will guide you through setting up a file storage configuration tailored to your environment and ready for production.

What is required?#

  • Bacularis version 4.1.0 or greater.

  • A disk storage path where Bacula backups will be saved

  • Bacula Storage Daemon installed on the host where the storage path is located

  • If the Storage Daemon is on a different (remote) host than the Bacularis web interface, then the Bacularis API must be installed and configured on that remote host

How to do it?#

Preparation#

Before configuring file storage in Bacularis, you need to set the correct permissions for the storage directory. To determine which system user and group the Bacula Storage Daemon runs under, execute the following command in your terminal:

ps -o user,group,comm -C bacula-sd

The output will show something like:

USER    GROUP    COMMAND
bacula  tape     bacula-sd

Now that you know the user and group, create the destination directory with the appropriate ownership. In this example, we’ll use /var/lib/bacula-storage, but you can choose any path suitable for your setup:

mkdir -m 750 /var/lib/bacula-storage
chown bacula:tape /var/lib/bacula-storage

Now the storage path is ready for use by the Bacula Storage Daemon.

In the Bacularis web interface, go to the Storage page from the main menu, then click the Add file storage button. This will open the New file storage wizard.

Step 1 - General#

In the first step of the wizard, enter a name for the new storage (you may also provide an optional description).

For the question What storage type would you like to create?, choose one of the following:

  • Single file device storage - a simple, single Bacula device. Suitable for small environments with a limited number of backups.

  • Multi-device file storage (Autochanger) - a full virtual autochanger with multiple drives. This option is more flexible and is recommended for most environments.

Step 2 - Storage#

If you selected the Autochanger option, you will now be able to specify:

  • The number of backup/restore drives

  • The number of restore-reserved drives

In the storage directory path field, enter the path you prepared earlier. For example:

/var/lib/bacula-storage

For the question What is the storage media type?, specify a name for the media type. This can be any string, but it should be unique for each file storage, especially when using different storage directory paths.

Step 3 - Summary#

Review the summary of your configuration. If everything looks correct, finalize the wizard.

You will be prompted to allow Bacularis to restart the Bacula Storage Daemon.

Important notes#

If you do not allow Bacularis to restart the Storage Daemon at the end of the wizard, the storage configuration will be saved, but not active. Bacula will not use the new storage until the daemon is restarted.

You can restart the Storage Daemon either during the final step of the wizard or later by going to the storage details page:

[Main menu] => [Page: Storage] => [Select storage in table] => [Button: Details]

Video guide#

You can watch a video tutorial demonstrating how to create Bacula file storage using the Bacularis storage wizard here: