diff --git a/README b/README new file mode 100644 index 0000000..4d93582 --- /dev/null +++ b/README @@ -0,0 +1,40 @@ +======== Features + +- Standard components: director, storage, client, docs, bconsole. +- Graphical components: bat, bacula-tray-monitor (where supported). +- Nagios plugin. +- HTML/PDF docs. +- File Daemon bpipe-fd plugin. +- POSIX.1e capabilities for File Daemon. +- Systemd for Fedora 15+. +- GZIP/LZO compression (where supported). +- Static uid/gid of 133 (see "setup" package). +- No usermode / fedora-usermgmt stuff in the console packages. +- Docs no longer an arch specific subpackage. +- SQL libraries needed only by Director and Storage daemons. +- Tab completion for bconsole. + +======== PostgreSQL, MySQL and SQLite databases + +Bacula director supports different databases backends, if you want to switch +away from the default PostgreSQL one you need to change the "libbaccats" (the +catalogue library) symlink to the real library. + +To change to a different backend, issue the following command: + +# alternatives --config libbaccats.so + +There are 3 programs which provide 'libbaccats.so'. + + Selection Command +----------------------------------------------- + 1 /usr/lib64/libbaccats-mysql.so + 2 /usr/lib64/libbaccats-sqlite3.so +*+ 3 /usr/lib64/libbaccats-postgresql.so + +Enter to keep the current selection[+], or type selection number: 1 + +There is NO need to edit any part in the Bacula Director configuration. + +Please look at the quickstart_.txt files for a quick start with the +various backends. diff --git a/README.Fedora b/README.Fedora deleted file mode 100644 index 528d35b..0000000 --- a/README.Fedora +++ /dev/null @@ -1,98 +0,0 @@ -======== Features - -- Standard components: director, storage, client, docs, bconsole. -- Graphical components: bat, bacula-tray-monitor (where supported). -- Nagios plugin. -- HTML/PDF docs. -- File Daemon bpipe-fd plugin. -- POSIX.1e capabilities for File Daemon. -- Systemd for Fedora 15+. -- GZIP/LZO compression (where supported). -- Static uid/gid of 133 (see "setup" package). -- No usermode / fedora-usermgmt stuff in the console packages. -- Docs no longer an arch specific subpackage. -- SQL libraries needed only by Director and Storage daemons. -- Tab completion for bconsole. - -======== PostgreSQL, MySQL and SQLite databases - -Bacula director supports different databases backends, if you want to switch -away from the default PostgreSQL one you need to change the "libbaccats" (the -catalogue library) symlink to the real library. - -To change to a different backend, issue the following command: - -# alternatives --config libbaccats.so - -There are 3 programs which provide 'libbaccats.so'. - - Selection Command ------------------------------------------------ - 1 /usr/lib64/libbaccats-mysql.so - 2 /usr/lib64/libbaccats-sqlite3.so -*+ 3 /usr/lib64/libbaccats-postgresql.so - -Enter to keep the current selection[+], or type selection number: 1 - -======== Quick installation guide with the default PostgreSQL backend - -Perform the following commands to install Bacula with its default configuration -and all daemons and consoles in one server. - -1) Install packages - -# yum -y install postgresql-server bacula-director bacula-storage \ - bacula-client bacula-console bacula-console-bat - -2) Create database - -# postgresql-setup initdb -# systemctl enable postgresql.service -# systemctl start postgresql.service -# su - postgres -$ cd /usr/libexec/bacula -$ ./create_bacula_database -$ ./make_bacula_tables -$ ./grant_bacula_privileges - -3) Change passwords in /etc/bacula/*conf with something you like. The default - configuration prevents startup if there is any "filler" password in the - configuration files. - -# sed -i -e 's/@@DIR_PASSWORD@@/dir-Fedora/g' \ - -e 's/@@FD_PASSWORD@@/fd-Fedora/g' \ - -e 's/@@SD_PASSWORD@@/sd-Fedora/g' \ - -e 's/@@MON_DIR_PASSWORD@@/mon-dir-Fedora/g' \ - -e 's/@@MON_FD_PASSWORD@@/mon-fd-Fedora/g' \ - -e 's/@@MON_SD_PASSWORD@@/mon-sd-Fedora/g' \ - /etc/bacula/*conf - -4) Enable daemons and check they are working - -# systemctl enable bacula-dir.service -# systemctl enable bacula-sd.service -# systemctl enable bacula-fd.service - -# systemctl start bacula-dir.service -# echo status bacula-dir | bconsole - -# systemctl start bacula-sd.service -# echo status bacula-sd | bconsole - -# systemctl start bacula-fd.service -# echo status bacula-fd | bconsole - -5) Install the docs and read them - -# yum -y install bacula-docs - -6) If you don't backup to disk and have a tape library or autochanger, please -also install the magnetic tapes commands: - -# yum -y install mt-st mtx - - -======== Bugs - -Please file bugs against the appropriate component using the Fedora version. - diff --git a/bacula-checkconf b/bacula-checkconf deleted file mode 100644 index da3bb25..0000000 --- a/bacula-checkconf +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Check if we still have our @@PLACEHOLDERS@@ in the config. -# If yes, refuse to start, the user has never touched the config. - -if [ $# -ne 1 ]; then - echo "Usage: $0 [configfile]" - exit 1 -fi -grep -q '^[^#].*_PASSWORD@@' $1 -if [ $? -eq 0 ]; then - logger -st bacula-dir "Error: placeholder password in config file $1" - exit 6 -fi - -exit 0 - diff --git a/bacula-dir.init b/bacula-dir.init index 4a802fb..b5fa74a 100644 --- a/bacula-dir.init +++ b/bacula-dir.init @@ -42,7 +42,6 @@ start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " - bacula-checkconf $CONFIG daemon $prog $OPTS retval=$? echo diff --git a/bacula-dir.service b/bacula-dir.service index 0962a48..1dafbcf 100644 --- a/bacula-dir.service +++ b/bacula-dir.service @@ -7,7 +7,6 @@ After=network.target nss-lookup.target [Service] Environment=CONFIG=/etc/bacula/bacula-dir.conf EnvironmentFile=-/etc/sysconfig/bacula-dir -ExecStartPre=/usr/sbin/bacula-checkconf $CONFIG ExecStart=/usr/sbin/bacula-dir -f $OPTS -c $CONFIG -u $DIR_USER -g $DIR_GROUP StandardOutput=syslog Restart=always diff --git a/bacula-fd.init b/bacula-fd.init index e61ab41..0c1b503 100644 --- a/bacula-fd.init +++ b/bacula-fd.init @@ -40,7 +40,6 @@ start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " - bacula-checkconf $CONFIG daemon $prog $OPTS retval=$? echo diff --git a/bacula-fd.service b/bacula-fd.service index 3e2f7a1..ab00ce1 100644 --- a/bacula-fd.service +++ b/bacula-fd.service @@ -7,7 +7,6 @@ After=network.target nss-lookup.target [Service] Environment=CONFIG=/etc/bacula/bacula-fd.conf EnvironmentFile=-/etc/sysconfig/bacula-fd -ExecStartPre=/usr/sbin/bacula-checkconf $CONFIG ExecStart=/usr/sbin/bacula-fd -f $OPTS -c $CONFIG -u $FD_USER -g $FD_GROUP IOSchedulingClass=idle StandardOutput=syslog diff --git a/bacula-sd.init b/bacula-sd.init index 8222f88..409bc32 100644 --- a/bacula-sd.init +++ b/bacula-sd.init @@ -42,7 +42,6 @@ start() { [ -x $exec ] || exit 5 [ -f $config ] || exit 6 echo -n $"Starting $prog: " - bacula-checkconf $CONFIG daemon $prog $OPTS retval=$? echo diff --git a/bacula-sd.service b/bacula-sd.service index 6350fcd..01fcabb 100644 --- a/bacula-sd.service +++ b/bacula-sd.service @@ -7,7 +7,6 @@ After=network.target nss-lookup.target [Service] Environment=CONFIG=/etc/bacula/bacula-sd.conf EnvironmentFile=-/etc/sysconfig/bacula-sd -ExecStartPre=/usr/sbin/bacula-checkconf $CONFIG ExecStart=/usr/sbin/bacula-sd -f $OPTS -c $CONFIG -u $SD_USER -g $SD_GROUP StandardOutput=syslog Restart=always diff --git a/bacula.spec b/bacula.spec index d5afa0a..aaecf89 100644 --- a/bacula.spec +++ b/bacula.spec @@ -3,7 +3,7 @@ Name: bacula Version: 5.2.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details License: AGPLv3 with exceptions @@ -12,7 +12,11 @@ URL: http://www.bacula.org BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Source0: http://www.bacula.org/downloads/Bacula-%{version}/%{name}-%{version}.tar.gz -Source5: README.Fedora + +Source2: quickstart_postgresql.txt +Source3: quickstart_mysql.txt +Source4: quickstart_sqlite3.txt +Source5: README Source6: bacula.logrotate Source7: bacula-fd.init Source8: bacula-dir.init @@ -26,7 +30,6 @@ Source15: bacula-fd.sysconfig Source16: bacula-dir.sysconfig Source17: bacula-sd.sysconfig Source18: bacula-sd.sysconfig.el5 -Source19: bacula-checkconf Patch1: bacula-5.0.2-openssl.patch Patch2: bacula-5.2.2-queryfile.patch @@ -317,6 +320,7 @@ Provides check_bacula support for Nagios. %patch3 -p0 -b .priv %patch4 -p1 -b .bat-build %patch5 -p1 -b .seg-fault +cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} . # Remove execution permissions from files we're packaging as docs later on find updatedb -type f | xargs chmod -x @@ -386,8 +390,6 @@ pushd src/qt-console/tray-monitor popd %endif -cp %{SOURCE5} . - %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -427,7 +429,6 @@ install -p -m 755 -D scripts/logwatch/applybaculadate %{buildroot}%{_sysconfdir} install -p -m 644 -D scripts/logwatch/logfile.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/logfiles/bacula.conf install -p -m 644 -D scripts/logwatch/services.bacula.conf %{buildroot}%{_sysconfdir}/logwatch/conf/services/bacula.conf -install -p -m 755 -D %{SOURCE19} %{buildroot}%{_sbindir}/bacula-checkconf %if 0%{?fedora} || 0%{?rhel} >= 7 # Systemd unit files mkdir -p %{buildroot}%{_unitdir} @@ -751,8 +752,8 @@ fi %files common %defattr(-,root,root,-) -%doc AUTHORS ChangeLog LICENSE SUPPORT ReleaseNotes -%doc README.Fedora +%doc AUTHORS ChangeLog LICENSE SUPPORT +%doc README quickstart_* %config(noreplace) %{_sysconfdir}/logrotate.d/bacula %dir %{_sysconfdir}/%{name} %dir %{_libexecdir}/%{name} @@ -764,7 +765,6 @@ fi %{_mandir}/man8/btraceback.8.* %dir %attr(750, bacula, bacula) %{_localstatedir}/log/bacula %dir %attr(750, bacula, bacula) %{_localstatedir}/spool/bacula -%{_sbindir}/bacula-checkconf %files director %defattr(-,root,root,-) @@ -906,6 +906,10 @@ fi %changelog +* Thu Feb 21 2013 Simone Caronni - 5.2.13-2 +- Removed bacula-checkconf stuff. +- Separated postgresql, sqlite3 and mysql how to from README. + * Wed Feb 20 2013 Simone Caronni - 5.2.13-1 - Update to 5.2.13, drop upstreamed patch. - Remove Fedora 16 (EOL) checks. diff --git a/quickstart_mysql.txt b/quickstart_mysql.txt new file mode 100644 index 0000000..2118632 --- /dev/null +++ b/quickstart_mysql.txt @@ -0,0 +1,59 @@ +======== Quick installation guide with the MySQL backend ======== + +Perform the following commands to install Bacula with its default configuration +and all daemons and consoles in one server. + +1) Install packages + +# yum -y install mysql-server \ + bacula-director bacula-storage bacula-client \ + bacula-console bacula-console-bat + +2) Select the MySQL database backend + +# alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so + +3) Create database + +# systemctl enable mysqld.service +# systemctl start mysqld.service + +# cd /usr/libexec/bacula +# ./create_bacula_database mysql +# ./make_bacula_tables mysql +# ./grant_bacula_privileges mysql + +4) Change passwords in /etc/bacula/*conf with something you like. + +# sed -i -e 's/@@DIR_PASSWORD@@/dir-Fedora/g' \ + -e 's/@@FD_PASSWORD@@/fd-Fedora/g' \ + -e 's/@@SD_PASSWORD@@/sd-Fedora/g' \ + -e 's/@@MON_DIR_PASSWORD@@/mon-dir-Fedora/g' \ + -e 's/@@MON_FD_PASSWORD@@/mon-fd-Fedora/g' \ + -e 's/@@MON_SD_PASSWORD@@/mon-sd-Fedora/g' \ + /etc/bacula/*conf + +5) Enable daemons and check they are working + +# systemctl enable bacula-dir.service +# systemctl enable bacula-sd.service +# systemctl enable bacula-fd.service + +# systemctl start bacula-dir.service +# echo status bacula-dir | bconsole + +# systemctl start bacula-sd.service +# echo status bacula-sd | bconsole + +# systemctl start bacula-fd.service +# echo status bacula-fd | bconsole + +6) Install the docs and read them + +# yum -y install bacula-docs + +7) If you don't backup to disk and have a tape library or autochanger, please +also install the magnetic tapes commands: + +# yum -y install mt-st mtx + diff --git a/quickstart_postgresql.txt b/quickstart_postgresql.txt new file mode 100644 index 0000000..4c0afae --- /dev/null +++ b/quickstart_postgresql.txt @@ -0,0 +1,61 @@ +======== Quick installation guide with the default PostgreSQL backend ======== + +Perform the following commands to install Bacula with its default configuration +and all daemons and consoles in one server. + +1) Install packages + +# yum -y install postgresql-server \ + bacula-director bacula-storage bacula-client \ + bacula-console bacula-console-bat + +2) Select the PostgreSQL database backend + +# alternatives --set libbaccats.so /usr/lib64/libbaccats-postgresql.so + +3) Create database + +# postgresql-setup initdb +# systemctl enable postgresql.service +# systemctl start postgresql.service + +# su - postgres +$ cd /usr/libexec/bacula +$ ./create_bacula_database +$ ./make_bacula_tables +$ ./grant_bacula_privileges + +4) Change passwords in /etc/bacula/*conf with something you like. + +# sed -i -e 's/@@DIR_PASSWORD@@/dir-Fedora/g' \ + -e 's/@@FD_PASSWORD@@/fd-Fedora/g' \ + -e 's/@@SD_PASSWORD@@/sd-Fedora/g' \ + -e 's/@@MON_DIR_PASSWORD@@/mon-dir-Fedora/g' \ + -e 's/@@MON_FD_PASSWORD@@/mon-fd-Fedora/g' \ + -e 's/@@MON_SD_PASSWORD@@/mon-sd-Fedora/g' \ + /etc/bacula/*conf + +5) Enable daemons and check they are working + +# systemctl enable bacula-dir.service +# systemctl enable bacula-sd.service +# systemctl enable bacula-fd.service + +# systemctl start bacula-dir.service +# echo status bacula-dir | bconsole + +# systemctl start bacula-sd.service +# echo status bacula-sd | bconsole + +# systemctl start bacula-fd.service +# echo status bacula-fd | bconsole + +6) Install the docs and read them + +# yum -y install bacula-docs + +7) If you don't backup to disk and have a tape library or autochanger, please +also install the magnetic tapes commands: + +# yum -y install mt-st mtx + diff --git a/quickstart_sqlite3.txt b/quickstart_sqlite3.txt new file mode 100644 index 0000000..61f2b27 --- /dev/null +++ b/quickstart_sqlite3.txt @@ -0,0 +1,56 @@ +======== Quick installation guide with the SQLite backend ======== + +Perform the following commands to install Bacula with its default configuration +and all daemons and consoles in one server. + +1) Install packages + +# yum -y install sqlite \ + bacula-director bacula-storage bacula-client \ + bacula-console bacula-console-bat + +2) Select the SQLite database backend + +# alternatives --set libbaccats.so /usr/lib64/libbaccats-sqlite3.so + +3) Create database + +# cd /usr/libexec/bacula +# ./create_bacula_database sqlite3 +# ./make_bacula_tables sqlite3 +# ./grant_bacula_privileges sqlite3 + +4) Change passwords in /etc/bacula/*conf with something you like. + +# sed -i -e 's/@@DIR_PASSWORD@@/dir-Fedora/g' \ + -e 's/@@FD_PASSWORD@@/fd-Fedora/g' \ + -e 's/@@SD_PASSWORD@@/sd-Fedora/g' \ + -e 's/@@MON_DIR_PASSWORD@@/mon-dir-Fedora/g' \ + -e 's/@@MON_FD_PASSWORD@@/mon-fd-Fedora/g' \ + -e 's/@@MON_SD_PASSWORD@@/mon-sd-Fedora/g' \ + /etc/bacula/*conf + +5) Enable daemons and check they are working + +# systemctl enable bacula-dir.service +# systemctl enable bacula-sd.service +# systemctl enable bacula-fd.service + +# systemctl start bacula-dir.service +# echo status bacula-dir | bconsole + +# systemctl start bacula-sd.service +# echo status bacula-sd | bconsole + +# systemctl start bacula-fd.service +# echo status bacula-fd | bconsole + +6) Install the docs and read them + +# yum -y install bacula-docs + +7) If you don't backup to disk and have a tape library or autochanger, please +also install the magnetic tapes commands: + +# yum -y install mt-st mtx +