-$Id: CHANGES,v 1.137 2001/09/12 09:02:51 stelian Exp $
+$Id: CHANGES,v 1.138 2001/09/12 10:21:48 stelian Exp $
Changes between versions 0.4b23 and 0.4b24 (released ?????????????)
===================================================================
9. Updated the RPM spec file following the RedHat changes
(dynamically linked binaries now in /usr/sbin etc).
+10. Added a patch from Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
+ which enables restore to recognise multi volume compressed dumps
+ done on CD. Included his scripts for dump (which pipe the dump
+ output directly into cdrecord) and restore. There is now
+ possible to to backups to CD on the fly!
+
Changes between versions 0.4b22 and 0.4b23 (released July 20, 2001)
===================================================================
%files
%defattr(-,root,root)
%doc CHANGES COPYRIGHT KNOWNBUGS MAINTAINERS README REPORTING-BUGS THANKS TODO
-%doc dump.lsm
+%doc dump.lsm examples
%attr(0664,root,disk) %config(noreplace) %{_sysconfdir}/dumpdates
%attr(0755,root,root) /usr/sbin/dump
/usr/sbin/rdump
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.56 2001/09/12 09:02:51 stelian Exp $";
+ "$Id: tape.c,v 1.57 2001/09/12 10:21:49 stelian Exp $";
#endif /* not lint */
#include <config.h>
if (compressed && do_compress) {
comp_buf->length = bufsize;
worklen = TP_BSIZE + writesize;
+ compresult = 1;
#ifdef HAVE_ZLIB
if (!bzipflag) {
compresult = compress2(comp_buf->buf,
--- /dev/null
+ Experimental dump to CDROMs
+ ===========================
+
+Starting with dump/restore version 0.4b24 or later versions of
+dump/restore you can dump to CDROMs.
+
+You need a (successfully installed) CD-writing software like
+ cdrecord (tested with versions 1.11a04 onwards)
+
+These scripts use the new switch ('V') to restore
+which signals a multi-volume (non-tape) medium like CDROMs
+
+I have used the shell scripts below to generate/verify the dump
+
+YOU MUST MODIFY these - especially
+
+- adapt FS to the filesystem to be dumped
+- UserExit to the path to the user exit function like UserInfo below
+- FiFo to the path to a named pipe (better not on the same filesystem)
+- your cd device(s) ( I have /dev/cdrom a symlink to /dev/sr0 and
+ /dev/cdrw a symlink to /dev/sr1 )
+- your path to cdrecord and
+- - cdrecord's dev parameter must be adapted to your CD burner
+- - cdrecord's fs (= input fifo size), use less than 64m if you
+ are short of memory
+- - cdrecord's speed parameter : this parameter not only depends on the
+ capabilities of your CD burner BUT also on the speed of your CPU !!!
+ With the dump -z6 compression on a 900 MHz Pentium III I had no problems
+ with speed=4 which is the maximum speed for my burner.
+ It looks as if at least speed=6 would be possible on a 900 MHz Pentium III.
+ If speed is to large, cdrecord's input fifo gets empty (as
+ shown by cdrecord) and then you have a buffer underrun.
+
+- replace the wayplay command with something which alerts you if you
+ have to change CDROMS
+
+- for restore or verification replace /dev/cdrom by something
+ which applies for you (device for the CDreader)
+
+
+DON'T FORGET to generate a boot-CD which has the 0.4b24 restore
+ or a newer version of restore on board
+
+I prefer timos_Rescue_Cd_Set-0.6.1 see http://rescuecd.sourceforge.net
+
+
+Please Cc bug-reports to jarausch@igpm.rwth-aachen.de
+
+-----------------------------------------------------------------
+This file and the scripts were slightly edited when the
+Helmut Jarausch patch was integrated in dump-0.4b24.
+ Stelian.
+
--- /dev/null
+#!/bin/bash
+# $1 = filename
+# $2 = sequence number
+
+wavplay -q /root/alert.wav
+num=$[$2+1]
+echo "insert next CD (number $num) "
+read -p "CD number $num ready? " Ans
+
+xterm -hold -T cdrecord_$num -e \
+ /usr/local/bin/cdrecord dev=0,1,0 fs=64m \
+ -v speed=4 -eject -pad -data $1 &
--- /dev/null
+#!/bin/bash
+if [ `id -u` != 0 ]; then
+ echo "root priviledges are required"
+ exit 1
+fi
+Level=0
+Label=`date -I`
+#CD_Cap=650
+CD_Cap=700
+eval Cap=$(($CD_Cap*1024))
+FS=/
+UserExit=/root/dump_userinfo.sh
+FiFo=/tmp/dump.fifo
+rm -f $FiFo
+mkfifo $FiFo
+xterm -T cdrecord_1 -hold -e cdrecord dev=0,1,0 fs=64m \
+ -v speed=4 -eject -pad -data $FiFo &
+
+/sbin/dump -z6 -b64 -B$Cap -F $UserExit \
+ -$Level -L $Label -f $FiFo $FS
+
+wavplay -q /root/alert.wav
+rm -f $FiFo
+
--- /dev/null
+#!/bin/bash
+
+if [ `id -u` != 0 ]; then
+ echo "root priviledges are required"
+ exit 1
+fi
+cd /
+/sbin/restore -V -b64 -C -f /dev/cdrom
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.28 2001/08/14 13:11:58 stelian Exp $";
+ "$Id: main.c,v 1.29 2001/09/12 10:21:49 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include "extern.h"
int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
-int hflag = 1, mflag = 1, Mflag = 0, Nflag = 0, zflag = 0;
+int hflag = 1, mflag = 1, Mflag = 0, Nflag = 0, Vflag = 0, zflag = 0;
int uflag = 0;
int dokerberos = 0;
char command = '\0';
#ifdef USE_QFA
"Q:"
#endif
- "Rrs:tT:uvxX:y")) != -1)
+ "Rrs:tT:uvVxX:y")) != -1)
switch(ch) {
case 'b':
/* Change default tape blocksize. */
case 'v':
vflag = 1;
break;
+ case 'V':
+ Vflag = 1;
+ break;
case 'X':
if( !strcmp(optarg,"-") ) {
use_stdin("-X");
(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 "Mvy] [-b blocksize] [-D filesystem] [-f file] [-F script] [-s fileno]",
- __progname, " -i [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno]",
- __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
- __progname, " -R [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-F script] [-s fileno] [-T directory]",
- __progname, " -t [-ch" kerbflag "Muvy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]",
- __progname, " -x [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]");
+ __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 ...]");
exit(1);
}
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: restore.8.in,v 1.16 2001/07/18 13:12:33 stelian Exp $
+.\" $Id: restore.8.in,v 1.17 2001/09/12 10:21:49 stelian Exp $
.\"
.Dd __DATE__
.Dt RESTORE 8
.Sh SYNOPSIS
.Nm restore
.Fl C
-.Op Fl ckMvy
+.Op Fl ckMvVy
.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 chkmMNuvy
+.Op Fl chkmMNuvVy
.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 ckMNuvy
+.Op Fl ckMNuvVy
.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 ckMNuvy
+.Op Fl ckMNuvVy
.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 chkMNuvy
+.Op Fl chkMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
.Op file ...
.Nm restore
.Fl x
-.Op Fl chkmMNuvy
+.Op Fl chkmMNuvVy
.Op Fl b Ar blocksize
.Op Fl f Ar file
.Op Fl F Ar script
(verbose)
flag causes it to type the name of each file it treats
preceded by its file type.
+.It Fl V
+Enables reading multi-volume non-tape mediums like CDROMs.
.It Fl X Ar filelist
Read list of files to be listed or extracted from the text file
.Ar filelist
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
*
- * $Id: restore.h,v 1.17 2001/08/13 16:17:52 stelian Exp $
+ * $Id: restore.h,v 1.18 2001/09/12 10:21:49 stelian Exp $
*/
/*
extern int hflag; /* restore heirarchies */
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 */
extern int Nflag; /* do not write the disk */
extern int uflag; /* unlink symlink targets */
extern int vflag; /* print out actions taken */
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.46 2001/08/16 15:24:22 stelian Exp $";
+ "$Id: tape.c,v 1.47 2001/09/12 10:21:49 stelian Exp $";
#endif /* not lint */
#include <config.h>
/* read the block prefix */
ret = read_a_block(mt, tapebuf, PREFIXSIZE, &rl);
+
+ if (Vflag && (ret == 0 || rl < PREFIXSIZE || tpb->length == 0))
+ ret = 0;
if (ret <= 0)
goto readerr;
magtapein = ioctl(mt, MTIOCGET, (char *)&mt_stat) == 0;
}
- Vprintf(stdout,"Input is from %s\n", magtapein? "tape": "file/pipe");
+ Vprintf(stdout,"Input is from %s\n",
+ magtapein ? "tape" :
+ Vflag ? "multi-volume (no tape)" : "file/pipe");
}
/*