The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
This program is Free Software; you can redistribute it and/or
- modify it under the terms of version two of the GNU General Public
+ modify it under the terms of version three of the GNU Affero General Public
License as published by the Free Software Foundation and included
in the file LICENSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Affero General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
" -d <nn> set debug level to <nn>\n"
" -dt print a timestamp in debug output\n"
" -f fix inconsistencies\n"
+" -t test if client library is thread-safe\n"
" -v verbose\n"
" -? print this message\n\n");
exit(1);
int ch;
const char *user, *password, *db_name, *dbhost;
int dbport = 0;
+ bool test_thread=false;
bool print_catalog=false;
char *configfile = NULL;
char *catalogname = NULL;
memset(&id_list, 0, sizeof(id_list));
memset(&name_list, 0, sizeof(name_list));
- while ((ch = getopt(argc, argv, "bc:C:d:fvB?")) != -1) {
+ while ((ch = getopt(argc, argv, "bc:C:d:fvBt?")) != -1) {
switch (ch) {
case 'B':
print_catalog = true; /* get catalog information from config */
case 'v':
verbose++;
break;
+ case 't':
+ test_thread=true;
+ break;
case '?':
default:
OSDependentInit();
+ if (test_thread) {
+ /* When we will load the SQL backend with ldopen, this check would be
+ * moved after the database initialization. It will need a valid config
+ * file.
+ */
+ db_check_backend_thread_safe();
+ Pmsg0(0, _("OK - DB backend seems to be thread-safe.\n"));
+ exit(0);
+ }
+
if (configfile) {
CAT *catalog = NULL;
int found = 0;
else
printf(_(" Verbose is off.\n"));
- printf(_("Please select the fuction you want to perform.\n"));
+ printf(_("Please select the function you want to perform.\n"));
while (!quit) {
if (fix) {