]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_restore.c
kes Reduce bconsole help to fit in 80 columns
[bacula/bacula] / bacula / src / dird / ua_restore.c
index 7e4d8d31833d40e74cdb1f0a0a8daabb32ced570..36857ed38793e802097e481cf6b9808e2fc7142e 100644 (file)
@@ -444,6 +444,7 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
       "add_suffix",   /* 17 */
       "regexwhere",   /* 18 */
       "restoreclient", /* 19 */
+      "copies",        /* 20 */
       NULL
    };
 
@@ -989,6 +990,9 @@ static void split_path_and_filename(UAContext *ua, RESTORE_CTX *rx, char *name)
 
 static bool ask_for_fileregex(UAContext *ua, RESTORE_CTX *rx)
 {
+   if (find_arg(ua, NT_("all")) >= 0) {  /* if user enters all on command line */
+      return true;                       /* select everything */
+   }
    ua->send_msg(_("\nThere were no files inserted into the tree, so file selection\n"
                   "is not possible.Most likely your retention policy pruned the files\n"));
    if (get_yesno(ua, _("\nDo you want to restore all the files? (yes|no): "))) {
@@ -1267,6 +1271,11 @@ static bool select_backups_before_date(UAContext *ua, RESTORE_CTX *rx, char *dat
    }
 
    if (rx->JobIds[0] != 0) {
+      if (find_arg(ua, NT_("copies")) > 0) {
+         /* Display a list of all copies */
+         db_list_copies_records(ua->jcr, ua->db, 0, rx->JobIds, 
+                                prtit, ua, HORZ_LIST);
+      }
       /* Display a list of Jobs selected for this restore */
       db_list_sql_query(ua->jcr, ua->db, uar_list_temp, prtit, ua, 1, HORZ_LIST);
       ok = true;