/* the various encodings of dump size */
/* this should also match BSDI pre-3.0's buggy dump program, that
produced doubled DUMP: DUMP: messages */
- AM_SIZE_RE("DUMP: [0-9][0-9]* tape blocks", 1024),
- AM_SIZE_RE("dump: Actual: [0-9][0-9]* tape blocks", 1024),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* tape blocks", 1024, 1),
+ AM_SIZE_RE("dump: Actual: [0-9][0-9]* tape blocks", 1024, 1),
AM_SIZE_RE("backup: There are [0-9][0-9]* tape blocks on [0-9][0-9]* tapes",
- 1024),
+ 1024, 1),
AM_SIZE_RE("backup: [0-9][0-9]* tape blocks on [0-9][0-9]* tape\\(s\\)",
- 1024),
+ 1024, 1),
AM_SIZE_RE("backup: [0-9][0-9]* 1k blocks on [0-9][0-9]* volume\\(s\\)",
- 1024),
+ 1024, 1),
AM_SIZE_RE("DUMP: [0-9][0-9]* blocks \\([0-9][0-9]*KB\\) on [0-9][0-9]* volume",
- 512),
+ 512, 1),
AM_SIZE_RE("DUMP: [0-9][0-9]* blocks \\([0-9][0-9]*\\.[0-9][0-9]*MB\\) on [0-9][0-9]* volume",
- 512),
- AM_SIZE_RE("DUMP: [0-9][0-9]* blocks", 1024),
- AM_SIZE_RE("DUMP: [0-9][0-9]* bytes were dumped", 1),
+ 512, 1),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* blocks \\([0-9][0-9]*KB\\)",
+ 1024, 2),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* blocks \\([0-9][0-9]*\\.[0-9][0-9]*MB\\)",
+ 1048576, 2),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* blocks", 512, 1),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* bytes were dumped", 1, 1),
/* OSF's vdump */
- AM_SIZE_RE("vdump: Dumped [0-9][0-9]* of [0-9][0-9]* bytes", 1),
+ AM_SIZE_RE("vdump: Dumped [0-9][0-9]* of [0-9][0-9]* bytes", 1, 1),
/* DU 4.0a dump */
- AM_SIZE_RE("dump: Actual: [0-9][0-9]* blocks output to pipe", 1024),
+ AM_SIZE_RE("dump: Actual: [0-9][0-9]* blocks output to pipe", 1024, 1),
/* DU 4.0 vdump */
- AM_SIZE_RE("dump: Dumped [0-9][0-9]* of [0-9][0-9]* bytes", 1),
+ AM_SIZE_RE("dump: Dumped [0-9][0-9]* of [0-9][0-9]* bytes", 1, 1),
/* HPUX dump */
- AM_SIZE_RE("DUMP: [0-9][0-9]* KB actual output", 1024),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* KB actual output", 1024, 1),
/* HPUX 10.20 and above vxdump */
- AM_SIZE_RE("vxdump: [0-9][0-9]* tape blocks", 1024),
+ AM_SIZE_RE("vxdump: [0-9][0-9]* tape blocks", 1024, 1),
/* UnixWare vxdump */
- AM_SIZE_RE("vxdump: [0-9][0-9]* blocks", 1024),
+ AM_SIZE_RE("vxdump: [0-9][0-9]* blocks", 1024, 1),
/* SINIX vxdump */
- AM_SIZE_RE(" VXDUMP: [0-9][0-9]* blocks", 512),
+ AM_SIZE_RE(" VXDUMP: [0-9][0-9]* blocks", 512, 1),
/* SINIX ufsdump */
- AM_SIZE_RE(" UFSDUMP: [0-9][0-9]* blocks", 512),
+ AM_SIZE_RE(" UFSDUMP: [0-9][0-9]* blocks", 512, 1),
/* Irix 6.2 xfs dump */
- AM_SIZE_RE("xfsdump: media file size [0-9][0-9]* bytes", 1),
+ AM_SIZE_RE("xfsdump: media file size [0-9][0-9]* bytes", 1, 1),
/* NetApp dump */
- AM_SIZE_RE("DUMP: [0-9][0-9]* KB", 1024),
+ AM_SIZE_RE("DUMP: [0-9][0-9]* KB", 1024, 1),
/* strange dump lines */
AM_STRANGE_RE("should not happen"),
char *device = NULL;
char *fstype = NULL;
char *cmd = NULL;
+ char *cmdX = NULL;
char *indexcmd = NULL;
char level_str[NUM_STR_SIZE];
char *compopt = NULL;
/* now do the client-side compression */
- if(options->compress == COMPR_FAST || options->compress == COMPR_BEST) {
+ if(options->compress == COMP_FAST || options->compress == COMP_BEST) {
compopt = skip_argument;
#if defined(COMPRESS_BEST_OPT) && defined(COMPRESS_FAST_OPT)
- if(options->compress == COMPR_BEST) {
+ if(options->compress == COMP_BEST) {
compopt = COMPRESS_BEST_OPT;
} else {
compopt = COMPRESS_FAST_OPT;
dbprintf((" %s", compopt));
}
dbprintf(("\n"));
- } else if (options->compress == COMPR_CUST) {
+ } else if (options->compress == COMP_CUST) {
compopt = skip_argument;
comppid = pipespawn(options->clntcompprog, STDIN_PIPE,
&dumpout, &compout, &mesgf,
#if defined(USE_RUNDUMP) || !defined(DUMP)
cmd = vstralloc(libexecdir, "/", "rundump", versionsuffix(), NULL);
+ cmdX = cmd;
if (g_options->config)
config = g_options->config;
else
config = "NOCONFIG";
#else
cmd = stralloc(DUMP);
+ cmdX = skip_argument;
config = skip_argument;
#endif
{
char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump",
versionsuffix(), NULL);
+ cmdX = cmd;
if (g_options->config)
config = g_options->config;
else
dumpkeys = stralloc(level_str);
dumppid = pipespawn(progname, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
- config, /* JLM */
+ cmdX, config,
"xfsdump",
options->no_record ? "-J" : skip_argument,
"-F",
#ifdef USE_RUNDUMP
char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump",
versionsuffix(), NULL);
+ cmdX = cmd;
if (g_options->config)
config = g_options->config;
else
config = "NOCONFIG";
#else
char *progname = cmd = newvstralloc(cmd, VXDUMP, NULL);
+ cmdX = skip_argument;
config = skip_argument;
#endif
program->backup_name = VXDUMP;
dumppid = pipespawn(progname, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
- progname, config, /* JLM */
+ cmdX, config,
"vxdump",
dumpkeys,
"1048576",
{
char *progname = cmd = newvstralloc(cmd, libexecdir, "/", "rundump",
versionsuffix(), NULL);
+ cmdX = cmd;
if (g_options->config)
config = g_options->config;
else
dumppid = pipespawn(cmd, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
- cmd, config,
+ cmdX, config,
"vdump",
dumpkeys,
"60",
#define RESTORE "restore"
#endif
+#ifdef HAVE_HONOR_NODUMP
+# define PARAM_HONOR_NODUMP "h"
+#else
+# define PARAM_HONOR_NODUMP ""
+#endif
dumpkeys = vstralloc(level_str,
options->no_record ? "" : "u",
"s",
-#ifdef HAVE_HONOR_NODUMP
- "h",
-#endif
+ PARAM_HONOR_NODUMP,
"f",
NULL);
dumppid = pipespawn(cmd, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
- cmd, config,
+ cmdX, config,
"dump",
dumpkeys,
"1048576",
dumppid = pipespawn(cmd, STDIN_PIPE,
&dumpin, &dumpout, &mesgf,
- cmd, config,
+ cmdX, config,
"backup",
dumpkeys,
"-",