2 * Amanda, The Advanced Maryland Automatic Network Disk Archiver
3 * Copyright (c) 1991-1998 University of Maryland at College Park
4 * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
7 * Permission to use, copy, modify, distribute, and sell this software and its
8 * documentation for any purpose is hereby granted without fee, provided that
9 * the above copyright notice appear in all copies and that both that
10 * copyright notice and this permission notice appear in supporting
11 * documentation, and that the name of U.M. not be used in advertising or
12 * publicity pertaining to distribution of the software without specific,
13 * written prior permission. U.M. makes no representations about the
14 * suitability of this software for any purpose. It is provided "as is"
15 * without express or implied warranty.
17 * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M.
19 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
21 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 * Authors: the Amanda Development Team. Its members are listed in a
25 * file named AUTHORS, in the root directory of this distribution.
28 * $Id: sendbackup.h,v 1.20 2006/07/25 18:10:07 martinea Exp $
30 * a few common decls for the sendbackup-* sources
36 #include "pipespawn.h"
37 #include "client_util.h"
40 void info_tapeheader(dle_t *dle);
41 void start_index(int createindex, int input, int mesg,
42 int index, char *cmd);
45 * Dump output lines are scanned for two types of regex matches.
47 * First, there are some cases, unfortunately, where dump detects an
48 * error but does not return an error code. We would like to bring these
49 * errors to the attention of the operators anyway.
51 * Second, we attempt to determine what dump thinks its output size is.
52 * This is cheaper than putting a filter between dump and compress just
53 * to determine the output size. The re_size table contains regexes to
54 * match the size output by various vendors' dump programs. Some vendors
55 * output the number in Kbytes, some in 512-byte blocks. Whenever an
56 * entry in re_size matches, the first integer in the dump line is
57 * multiplied by the scale field to get the dump size.
60 extern pid_t comppid, dumppid, encpid, tarpid;
61 extern pid_t indexpid;
62 extern g_option_t *g_options;
64 typedef struct backup_program_s {
65 char *name, *backup_name, *restore_name;
67 void (*start_backup)(dle_t *dle, char *host, int dataf, int mesgf, int indexf);
68 void (*end_backup)(dle_t *dle, int goterror);
71 extern backup_program_t *programs[], *program;
73 #endif /* !SENDBACKUP_H */