src/dird/ua_restore.c
static bool insert_dir_into_findex_list(UAContext *ua, RESTORE_CTX *rx, char *dir,
                                        char *date)
{
   strip_trailing_junk(dir);
   if (*rx->JobIds == 0) {
      ua->error_msg(_("No JobId specified cannot continue.\n"));
      return false;
   } else {
      Mmsg(rx->query, uar_jobid_fileindex_from_dir[db_get_type_index(ua->db)], rx->JobIds, dir, 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)) {
      ua->error_msg(_("Query failed: %s. ERR=%s\n"),
         rx->query, db_strerror(ua->db));
   }
   if (!rx->found) {
      ua->error_msg(_("No database record found for: %s\n"), dir);
      return true;
   }
   return true;
}
/*
 * For a given path lookup the most recent backup in the catalog
 * to get the JobId and FileIndexes of all files in that directory.
 */
For a given path lookup the most recent backup in the catalog
to get the JobId and FileIndexes of all files in that directory.
For a given path lookup the most recent backup in the catalog to get the JobId and FileIndexes of all files in that directory .
static bool insert_dir_into_findex_list(UAContext *ua, RESTORE_CTX *rx, char *dir,
                                        char *date)
{
   strip_trailing_junk(dir);
   if (*rx->JobIds == 0) {
      ua->error_msg(_("No JobId specified cannot continue.\n"));
      return false;
   } else {
      Mmsg(rx->query, uar_jobid_fileindex_from_dir[db_get_type_index(ua->db)], rx->JobIds, dir, rx->ClientName);
   }
   rx->found = false;
   if (!db_sql_query(ua->db, rx->query, jobid_fileindex_handler, (void *)rx)) {
      ua->error_msg(_("Query failed: %s. ERR=%s\n"),
         rx->query, db_strerror(ua->db));
   }
   if (!rx->found) {
      ua->error_msg(_("No database record found for: %s\n"), dir);
      return true;
   }
   return true;
}
static bool insert_dir_into_findex_list ( UAContext * ua , RESTORE_CTX * rx , char * dir , char * date ) { strip_trailing_junk ( dir ) ; if ( * rx -> JobIds == 0 ) { ua -> error_msg ( _ ( " \n " ) ) ; return false ; } else { Mmsg ( rx -> query , uar_jobid_fileindex_from_dir [ db_get_type_index ( ua -> db ) ] , rx -> JobIds , dir , rx -> ClientName ) ; } rx -> found = false ; if ( ! db_sql_query ( ua -> db , rx -> query , jobid_fileindex_handler , ( void * ) rx ) ) { ua -> error_msg ( _ ( " \n " ) , rx -> query , db_strerror ( ua -> db ) ) ; } if ( ! rx -> found ) { ua -> error_msg ( _ ( " \n " ) , dir ) ; return true ; } return true ; }
For a given path lookup the most recent backup in the catalog
 to get the JobId and FileIndexes of all files in that directory.
For a given path lookup the most recent backup in the catalog to get the JobId and FileIndexes of all files in that directory .
/* Find and insert jobid and File Index */