2 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3 * Copyright (c) 1991-1998 University of Maryland at College Park
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of U.M. not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. U.M. makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
16 * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Authors: the Amanda Development Team. Its members are listed in a
24 * file named AUTHORS, in the root directory of this distribution.
27 * $Id: restore.h,v 1.8.2.1 2006/09/27 12:04:09 martinea Exp $
35 #include "fileheader.h"
37 #include "amfeatures.h"
39 #define CREAT_MODE 0640
41 typedef struct match_list_s {
46 struct match_list_s *next;
49 typedef struct rst_flags_s {
50 unsigned int inline_assemble:1;
51 unsigned int delay_assemble:1;
52 unsigned int compress:1;
53 unsigned int leave_comp:1;
55 unsigned int headers:1;
56 unsigned int isafile:1;
57 unsigned int wait_tape_prompt:1; /* for interactive console use */
58 unsigned int amidxtaped:1; /* for client-daemon use */
59 unsigned int check_labels:1;
60 unsigned int mask_splits:1;
70 char *make_filename(dumpfile_t *file);
71 int disk_match(dumpfile_t *file, char *datestamp,
72 char *hostname, char *diskname, char *level);
73 ssize_t read_file_header(dumpfile_t *file, int tapefd, int isafile,
75 ssize_t restore(dumpfile_t *file, char *filename, int tapefd, int isafile,
77 void flush_open_outputs(int reassemble, dumpfile_t *only_file);
78 void search_tapes(FILE *prompt_out, FILE *prompt_in, int use_changer,
79 tapelist_t *tapelist, match_list_t *restorethese,
80 rst_flags_t *flags, am_feature_t *their_features);
81 int have_all_parts(dumpfile_t *file, int upto);
82 rst_flags_t *new_rst_flags(void);
83 int check_rst_flags(rst_flags_t *flags);
84 void free_rst_flags(rst_flags_t *flags);
85 void free_match_list(match_list_t *match_list);
86 int lock_logfile(void);
87 void send_message(FILE *prompt_out, rst_flags_t *flags,
88 am_feature_t *their_features, char * format, ...);
89 /* __attribute__ ((format (printf, 4, 5))); */
92 #endif /* RESTORE_H */