Using an Autochanger
BWeb permits graphically administering your autochangers using mtx
.
Bacula Configuration
Your autochanger as well as its drives, if there is more than one, must
be defined in the Director’s configuration file. Our example will use an
LTO3
changer with three drives: LTO3_0
, LTO3_1
,
LTO3_2
. All these three drives will be defined in three different
Storage resources in the Director configuration file.
Storage {
Name = LTO3
...
Autochanger = LTO3
}
Storage {
Name = LTO3_0
...
Autochanger = LTO3
}
Storage {
Name = LTO3_1
...
Autochanger = LTO3
}
Storage {
Name = LTO3_2
...
Autochanger = LTO3
}
Hardware Access
BWeb doesn’t use Bacula to do physical operations on media, you have
to configure BWeb to be able to use system commands. Under normal
circumstances, the web users can’t access drives or an autochanger
directly. It is possible to configure sudo
with visudo
for that
purpose.
# grep mtx /etc/sudoers
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *
If you are using bacula
account with lighttpd
to run the web
server, bacula
should be a member of the tape
group, and you
don’t need sudo configuration.
Remote Autochanger
If you want to use a remote Storage Daemon, you can use ssh
to
remotely access your autochanger from your web server. You will need to
configure an ssh key exchange between your web user and an authorized
user that can use the hardware (directly or with the sudo
command).
You will have to configure ssh
as pre-command under BWeb (see
figure 14). An example could be to
use ssh bacula@storage1
.
BWeb Configuration
Before you begin using BWeb, you must define a location with the same name as your autochanger (Cf. Managing Volume Locations). Through the Setup menu, you will be able to declare your autochangers in BWeb as shown in figure 13.
To be able to work, BWeb has to know your autochanger configuration, especially the drive order — Drive Index in the Storage Daemon configuration — see figure 14.
Go back to Installation with Packages chapter.