-$Id: CHANGES,v 1.142 2001/11/13 12:11:05 stelian Exp $
+$Id: CHANGES,v 1.143 2001/11/16 14:09:07 stelian Exp $
Changes between versions 0.4b24 and 0.4b25 (released ??????????????????)
========================================================================
to Clemens Stiglechner <a9401816@unet.univie.ac.at> for the
patch.
+6. Add the -l option to restore to specify if, when doing a
+ remote restore, the file used to access the backup is a
+ regular file (the defaults being a tape drive). Restore needs
+ to know this information when reading a remote compressed
+ dump. Previously, this information was autodetected, but
+ the autodetection code fails (with ioctl: Inappropriate ioctl
+ for device) when using a non Linux remote box.
+
Changes between versions 0.4b23 and 0.4b24 (released September 12, 2001)
========================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.31 2001/11/13 12:11:42 stelian Exp $";
+ "$Id: main.c,v 1.32 2001/11/16 14:09:07 stelian Exp $";
#endif /* not lint */
#include <config.h>
int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
int hflag = 1, mflag = 1, Mflag = 0, Nflag = 0, Vflag = 0, zflag = 0;
-int uflag = 0;
+int uflag = 0, lflag = 0;
int dokerberos = 0;
char command = '\0';
long dumpnum = 1;
#ifdef KERBEROS
"k"
#endif
- "mMN"
+ "lmMN"
#ifdef USE_QFA
"Q:"
#endif
ch, command);
command = ch;
break;
+ case 'l':
+ lflag = 1;
+ break;
case 'm':
mflag = 0;
break;
atexit(cleanup);
- if (command == 'C' && inputdev[0] != '/' && strcmp(inputdev, "-")) {
+ if (command == 'C' && inputdev[0] != '/' && strcmp(inputdev, "-")
+#ifdef RRESTORE
+ && !strchr(inputdev, ':')
+#endif
+ ) {
/* since we chdir into the directory we are comparing
* to, we must retain the full tape path */
char wd[MAXPATHLEN], fullpathinput[MAXPATHLEN];
(void)fprintf(stderr,
"usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
- __progname, " -C [-c" kerbflag "MvVy] [-b blocksize] [-D filesystem] [-f file] [-F script] [-s fileno]",
- __progname, " -i [-ch" kerbflag "mMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
- __progname, " -r [-c" kerbflag "MuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
- __progname, " -R [-c" kerbflag "MuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
- __progname, " -t [-ch" kerbflag "MuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]",
- __progname, " -x [-ch" kerbflag "mMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]");
+ __progname, " -C [-c" kerbflag "lMvVy] [-b blocksize] [-D filesystem] [-f file] [-F script] [-s fileno]",
+ __progname, " -i [-ch" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
+ __progname, " -r [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
+ __progname, " -R [-c" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
+ __progname, " -t [-ch" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]",
+ __progname, " -x [-ch" kerbflag "lmMuvVy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]");
exit(1);
}
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: restore.8.in,v 1.18 2001/11/10 23:51:00 stelian Exp $
+.\" $Id: restore.8.in,v 1.19 2001/11/16 14:09:07 stelian Exp $
.\"
.Dd __DATE__
.Dt RESTORE 8
.Sh SYNOPSIS
.Nm restore
.Fl C
-.Op Fl ckMvVy
+.Op Fl cklMvVy
.Op Fl b Ar blocksize
.Op Fl D Ar filesystem
.Op Fl f Ar file
.Op Fl T Ar directory
.Nm restore
.Fl i
-.Op Fl chkmMNuvVy
+.Op Fl chklmMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op Fl T Ar directory
.Nm restore
.Fl R
-.Op Fl ckMNuvVy
+.Op Fl cklMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op Fl T Ar directory
.Nm restore
.Fl r
-.Op Fl ckMNuvVy
+.Op Fl cklMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op Fl T Ar directory
.Nm restore
.Fl t
-.Op Fl chkMNuvVy
+.Op Fl chklMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op file ...
.Nm restore
.Fl x
-.Op Fl chkmMNuvVy
+.Op Fl chklmMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
rather than the files that it references.
This prevents hierarchical restoration of complete subtrees
from the dump.
+.It Fl l
+When doing remote restores, assume the remote file is a
+regular file (instead of a tape device). If you're restoring
+a remote compressed file, you will need to specify this
+option or
+.Nm restore
+will fail to access it correctly.
.It Fl m
Extract by inode numbers rather than by file name.
This is useful if only a few files are being extracted,
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
*
- * $Id: restore.h,v 1.18 2001/09/12 10:21:49 stelian Exp $
+ * $Id: restore.h,v 1.19 2001/11/16 14:09:07 stelian Exp $
*/
/*
extern int bflag; /* set input block size */
extern int dflag; /* print out debugging info */
extern int hflag; /* restore heirarchies */
+extern int lflag; /* assume remote filename is a regular file */
extern int mflag; /* restore by name instead of inode number */
extern int Mflag; /* multi-volume restore */
extern int Vflag; /* multi-volume on a single device like CDROM */
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.47 2001/09/12 10:21:49 stelian Exp $";
+ "$Id: tape.c,v 1.48 2001/11/16 14:09:07 stelian Exp $";
#endif /* not lint */
#include <config.h>
/* need to know if input is really from a tape */
#ifdef RRESTORE
if (host)
- magtapein = rmtioctl(MTNOP, 1) != -1;
+ magtapein = !lflag;
else
#endif
magtapein = ioctl(mt, MTIOCGET, (char *)&mt_stat) == 0;