General:
Changes to 1.37.*:
+18Oct05
+ - Modify .backups command to get a fileset parameter (fix bug #444).
17Oct05
- Fix bug when recycling DVD devices (append flag was removed).
- Add tests for dvd+rw-format in configure script.
/* For ua_dotcmds.c */
const char *client_backups =
"SELECT DISTINCT Job.JobId,Client.Name as Client,Level,StartTime,"
- "JobFiles,JobBytes,VolumeName,MediaType"
- " FROM Client,Job,JobMedia,Media"
+ "JobFiles,JobBytes,VolumeName,MediaType,FileSet"
+ " FROM Client,Job,JobMedia,Media,FileSet"
" WHERE Client.Name='%s'"
+ " AND FileSet='%s'"
" AND Client.ClientId=Job.ClientId"
" AND JobStatus='T'"
" AND JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId"
+ " AND Job.FileSetId=FileSet.FileSetId"
" ORDER BY Job.StartTime";
if (!open_db(ua)) {
return 1;
}
- if (ua->argc == 2 && strcmp(ua->argk[1], "client") != 0) {
+ if (ua->argc != 3 || strcmp(ua->argk[1], "client") != 0 || strcmp(ua->argk[2], "fileset") != 0) {
return 1;
}
- Mmsg(ua->cmd, client_backups, ua->argv[1]);
+ Mmsg(ua->cmd, client_backups, ua->argv[1], ua->argv[2]);
if (!db_sql_query(ua->db, ua->cmd, client_backups_handler, (void *)ua)) {
bsendmsg(ua, _("Query failed: %s. ERR=%s\n"), ua->cmd, db_strerror(ua->db));
return 1;
SetStatus(finished);
}
-/* List jobs for a specified client */
+/* List jobs for a specified client and fileset */
void wxbRestorePanel::CmdListJobs() {
if (status == entered) {
configPanel->ClearRowChoices(_("Before"));
wxbUtils::WaitForPrompt("6\n");*/
wxbTableParser* tableparser = new wxbTableParser(false);
wxbDataTokenizer* dt = wxbUtils::WaitForEnd(
- wxString(wxT(".backups client=")) + configPanel->GetRowString(_("Client")) + wxT("\n"), true);
+ wxString(wxT(".backups client=\"")) + configPanel->GetRowString(_("Client")) +
+ wxT("\" fileset=\"") + configPanel->GetRowString(_("Fileset")) + wxT("\"\n"), true);
while (!tableparser->hasFinished()) {
wxTheApp->Yield(true);
* where=/tmp/bacula-restores
* level=0
* type=Restore
- * fileset=Full Set */
+ * fileset=***
+ */
wxString name, str;
unsigned int i;
configPanel->SetRowString(_("Storage"), str.Mid(j+1));
}
else if (name == wxT("fileset")) {
- configPanel->SetRowString(_("Fileset"), str.Mid(j+1));
+ str = str.Mid(j+1);
+ if ((str != configPanel->GetRowString(_("Fileset"))) ||
+ (configPanel->GetRowString(_("Before"))) == wxT("")) {
+ configPanel->SetRowString(_("Fileset"), str);
+ dolistjobs = true;
+ }
}
}
}
UpdateFirstConfig();
SetWorking(false);
}
- else if (event.GetId() == ConfigClient) {
+ else if ((event.GetId() == ConfigClient) || (event.GetId() == ConfigFileset)) {
if (IsWorking()) {
return;
}