static char *db_user = "bacula";
static char *db_password = "";
static char *wd = NULL;
-static int verbose = 0;
static int update_db = 0;
static int update_vol_info = 0;
static int list_records = 0;
static void usage()
{
fprintf(stderr, _(
-"\nVersion: " VERSION " (" DATE ")\n\n"
+"\nVersion: " VERSION " (" BDATE ")\n\n"
"Usage: bscan [-d debug_level] <bacula-archive>\n"
" -b bootstrap specify a bootstrap file\n"
" -c <file> specify configuration file\n"
" -r list records\n"
" -s synchronize or store in database\n"
" -v verbose\n"
+" -V specify Volume names (separated by |)\n"
" -w dir specify working directory (default from conf file)\n"
" -? print this message\n\n"));
exit(1);
{
int ch;
struct stat stat_buf;
+ char *VolumeName = NULL;
my_name_is(argc, argv, "bscan");
init_msg(NULL, NULL);
verbose++;
break;
+ case 'V': /* Volume name */
+ VolumeName = optarg;
+ break;
+
case 'w':
wd = optarg;
break;
working_directory);
}
- bjcr = setup_jcr("bscan", argv[0], bsr);
+ bjcr = setup_jcr("bscan", argv[0], bsr, VolumeName);
dev = setup_to_access_device(bjcr, 1); /* read device */
if (!dev) {
exit(1);
}
- if ((db=db_init_database(NULL, db_name, db_user, db_password)) == NULL) {
+ if ((db=db_init_database(NULL, db_name, db_user, db_password, NULL, 0, NULL)) == NULL) {
Emsg0(M_ERROR_TERM, 0, _("Could not init Bacula database\n"));
}
if (!db_open_database(NULL, db)) {
case JS_ErrorTerminated:
term_msg = _("*** Backup Error ***");
break;
- case JS_Cancelled:
- term_msg = _("Backup Cancelled");
+ case JS_Canceled:
+ term_msg = _("Backup Canceled");
break;
default:
term_msg = term_code;