/* Build run command */
if (rx.where) {
- Mmsg(&ua->cmd,
+ Mmsg(ua->cmd,
"run job=\"%s\" client=\"%s\" storage=\"%s\" bootstrap=\"%s/restore.bsr\""
" where=\"%s\" files=%d",
job->hdr.name, rx.ClientName, rx.store?rx.store->hdr.name:"",
working_directory, rx.where, rx.selected_files);
} else {
- Mmsg(&ua->cmd,
+ Mmsg(ua->cmd,
"run job=\"%s\" client=\"%s\" storage=\"%s\" bootstrap=\"%s/restore.bsr\""
" files=%d",
job->hdr.name, rx.ClientName, rx.store?rx.store->hdr.name:"",
working_directory, rx.selected_files);
}
if (find_arg(ua, _("yes")) > 0) {
- pm_strcat(&ua->cmd, " yes"); /* pass it on to the run command */
+ pm_strcat(ua->cmd, " yes"); /* pass it on to the run command */
}
Dmsg1(400, "Submitting: %s\n", ua->cmd);
parse_ua_args(ua);
switch (j) {
case 0: /* jobid */
if (*rx->JobIds != 0) {
- pm_strcat(&rx->JobIds, ",");
+ pm_strcat(rx->JobIds, ",");
}
- pm_strcat(&rx->JobIds, ua->argv[i]);
+ pm_strcat(rx->JobIds, ua->argv[i]);
done = true;
break;
case 1: /* current */
if (!get_client_name(ua, rx)) {
return 0;
}
- pm_strcpy(&ua->cmd, ua->argv[i]);
+ pm_strcpy(ua->cmd, ua->argv[i]);
insert_one_file(ua, rx, date);
if (rx->name_list.num_ids) {
/* Check MediaType and select storage that corresponds */
done = false;
break;
case 1: /* list where a file is saved */
- if (!get_cmd(ua, _("Enter Filename: "))) {
+ if (!get_cmd(ua, _("Enter Filename (no path):"))) {
return 0;
}
len = strlen(ua->cmd);
fname = (char *)malloc(len * 2 + 1);
db_escape_string(fname, ua->cmd, len);
- Mmsg(&rx->query, uar_file, fname);
+ Mmsg(rx->query, uar_file, fname);
free(fname);
gui_save = ua->jcr->gui;
ua->jcr->gui = true;
if (!get_cmd(ua, _("Enter JobId(s), comma separated, to restore: "))) {
return 0;
}
- pm_strcpy(&rx->JobIds, ua->cmd);
+ pm_strcpy(rx->JobIds, ua->cmd);
break;
case 3: /* Enter an SQL list command */
if (!get_cmd(ua, _("Enter SQL list command: "))) {
if (!get_client_name(ua, rx)) {
return 0;
}
- bsendmsg(ua, _("Enter file names, or < to enter a filename\n"
- "containg a list of file names, and terminate\n"
+ bsendmsg(ua, _("Enter file names with paths, or < to enter a filename\n"
+ "containg a list of file names with paths, and terminate\n"
"them with a blank line.\n"));
for ( ;; ) {
- if (!get_cmd(ua, _("Enter filename: "))) {
+ if (!get_cmd(ua, _("Enter full filename: "))) {
return 0;
}
len = strlen(ua->cmd);
if (!get_client_name(ua, rx)) {
return 0;
}
- bsendmsg(ua, _("Enter file names, or < to enter a filename\n"
- "containg a list of file names, and terminate\n"
+ bsendmsg(ua, _("Enter file names with paths, or < to enter a filename\n"
+ "containg a list of file names with paths, and terminate\n"
"them with a blank line.\n"));
for ( ;; ) {
- if (!get_cmd(ua, _("Enter filename: "))) {
+ if (!get_cmd(ua, _("Enter full filename: "))) {
return 0;
}
len = strlen(ua->cmd);
{
strip_trailing_junk(file);
split_path_and_filename(rx, file);
- Mmsg(&rx->query, uar_jobid_fileindex, date, rx->path, rx->fname, rx->ClientName);
+ Mmsg(rx->query, uar_jobid_fileindex, date, rx->path, rx->fname, rx->ClientName);
rx->found = false;
/* Find and insert jobid and File Index */
if (!db_sql_query(ua->db, rx->query, jobid_fileindex_handler, (void *)rx)) {
/*
* Find the MediaTypes for this JobId and add to the name_list
*/
- Mmsg(&rx->query, uar_mediatype, rx->JobId);
+ Mmsg(rx->query, uar_mediatype, rx->JobId);
if (!db_sql_query(ua->db, rx->query, unique_name_list_handler, (void *)&rx->name_list)) {
bsendmsg(ua, "%s", db_strerror(ua->db));
return 0;
tree.FileEstimate = 0;
if (get_next_jobid_from_list(&p, &JobId) > 0) {
/* Use first JobId as estimate of the number of files to restore */
- Mmsg(&rx->query, uar_count_files, JobId);
+ Mmsg(rx->query, uar_count_files, JobId);
if (!db_sql_query(ua->db, rx->query, count_handler, (void *)rx)) {
bsendmsg(ua, "%s\n", db_strerror(ua->db));
}
continue; /* eliminate duplicate JobIds */
}
last_JobId = JobId;
- bsendmsg(ua, _("Building directory tree for JobId %u ...\n"), JobId);
+ bsendmsg(ua, _("\nBuilding directory tree for JobId %u ... "), JobId);
items++;
/*
* Find files for this JobId and insert them in the tree
*/
- Mmsg(&rx->query, uar_sel_files, JobId);
+ Mmsg(rx->query, uar_sel_files, JobId);
if (!db_sql_query(ua->db, rx->query, insert_tree_handler, (void *)&tree)) {
bsendmsg(ua, "%s", db_strerror(ua->db));
}
/*
* Find the MediaTypes for this JobId and add to the name_list
*/
- Mmsg(&rx->query, uar_mediatype, JobId);
+ Mmsg(rx->query, uar_mediatype, JobId);
if (!db_sql_query(ua->db, rx->query, unique_name_list_handler, (void *)&rx->name_list)) {
bsendmsg(ua, "%s", db_strerror(ua->db));
}
}
}
if (i < 0) { /* fileset not found */
- Mmsg(&rx->query, uar_sel_fileset, cr.ClientId, cr.ClientId);
+ Mmsg(rx->query, uar_sel_fileset, cr.ClientId, cr.ClientId);
start_prompt(ua, _("The defined FileSet resources are:\n"));
if (!db_sql_query(ua->db, rx->query, fileset_handler, (void *)ua)) {
bsendmsg(ua, "%s\n", db_strerror(ua->db));
}
/* Find JobId of last Full backup for this client, fileset */
- Mmsg(&rx->query, uar_last_full, cr.ClientId, cr.ClientId, date, fsr.FileSet,
+ Mmsg(rx->query, uar_last_full, cr.ClientId, cr.ClientId, date, fsr.FileSet,
pool_select);
if (!db_sql_query(ua->db, rx->query, NULL, NULL)) {
bsendmsg(ua, "%s\n", db_strerror(ua->db));
}
/* Now find most recent Differental Job after Full save, if any */
- Mmsg(&rx->query, uar_dif, edit_uint64(rx->JobTDate, ed1), date,
+ Mmsg(rx->query, uar_dif, edit_uint64(rx->JobTDate, ed1), date,
cr.ClientId, fsr.FileSet, pool_select);
if (!db_sql_query(ua->db, rx->query, NULL, NULL)) {
bsendmsg(ua, "%s\n", db_strerror(ua->db));
}
/* Now find all Incremental Jobs after Full/dif save */
- Mmsg(&rx->query, uar_inc, edit_uint64(rx->JobTDate, ed1), date,
+ Mmsg(rx->query, uar_inc, edit_uint64(rx->JobTDate, ed1), date,
cr.ClientId, fsr.FileSet, pool_select);
if (!db_sql_query(ua->db, rx->query, NULL, NULL)) {
bsendmsg(ua, "%s\n", db_strerror(ua->db));
}
bstrncpy(rx->last_jobid, row[0], sizeof(rx->last_jobid));
if (rx->JobIds[0] != 0) {
- pm_strcat(&rx->JobIds, ",");
+ pm_strcat(rx->JobIds, ",");
}
- pm_strcat(&rx->JobIds, row[0]);
+ pm_strcat(rx->JobIds, row[0]);
return 0;
}