Initial commit

parents
9781565926424
\ No newline at end of file
## Example files for the title:
# Unix Backup and Recovery, by W. Preston
[![Unix Backup and Recovery, by W. Preston](http://akamaicovers.oreilly.com/images/9781565926424/cat.gif)](https://www.safaribooksonline.com/library/view/title/1565926420//)
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.
No preview for this file type
No preview for this file type
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win95; I) [Netscape]">
<title>Unix Backup &amp; Recovery Tools CD</title>
</head>
<body>
&nbsp;
<table BORDER WIDTH="522" >
<tr>
<td VALIGN=TOP WIDTH="29%" HEIGHT="562"><b><font size=+1>Unix Backup &amp;
Recovery Tools &amp; Procedures CD</font></b>
<p><b><i>This CD Contains:</i></b>
<p><b>Database Recovery Procedures for:</b>
<p>&nbsp; <a href="informix.html">Informix</a>
<p>&nbsp; <a href="oracle.html">Oracle</a>
<p>&nbsp; <a href="sybase.html">Sybase</a>
<p><b>An <a href="rfitable.html">RFI</a> for choosing backup software</b><b></b>
<p><b>Free Backup Utilities:</b>
<p>A one-step filesystem backup script: <a href="hostdump.tar">hostdump.sh</a>
<p>A hot backup script for Oracle: <a href="oraback.tar">oraback.sh</a>
<p>A hot backup script for Informix: <a href="infback.tar">infback.sh</a>
<p>A hot backup script for Sybase: <a href="syback.tar">syback.tar</a>
<p>A fast implementation of tar: <a href="star-1.2.tar">star</a>
<p>A tool to read bar tar images: <a href="badtar.tar">badtar</a>
<p>A tool to read pesky tapes: <a href="read-tape.sh">read_tape.sh</a>
<br>&nbsp;
<br>&nbsp;
<br><a href="code.html"></a>&nbsp;</td>
<td VALIGN=TOP WIDTH="71%" HEIGHT="562"><a href="http://www.backupcentral.com"><img SRC="unixbr.gif" height=475 width=361></a>
<br>&nbsp;
<center>
<p>It is always a good idea to check <a href="http://www.backupcentral.com">http://www.backupcentral.com</a>
for updated versions of the free software contained on this CD, as well
as other resources.</center>
</td>
</tr>
</table>
</body>
</html>
No preview for this file type
logo.png

3.31 KB

No preview for this file type
oracle.gif

59.9 KB

This diff could not be displayed because it is too large.
#!/sbin/sh
touch rawfile
# The rawfile might already be there, but just in case
while [ 1 -eq 1 ] # Whatever, just
do it
do
size=`ls -l rawfile | awk '{print $5}'` # Speaks
for itself
blocks=`expr "$size" / 512` # Ditto. 512 was
a good blocksize for 4mm DAT. Just be consistent
full=`df -k . | grep
<host> | awk '{print $6}'` # Unfortunately, this only gets
checked once per glitch. Maybe a fork?
echo $size
# Just so I know how it's going
echo $blocks
echo $full
if [ $full -gt
90 ]
then
echo "filesystem is filling up" # You
get the point here
exit 1
fi
mt -f /dev/tape rewind
# Let's not take chances. Start at the beginning.
sleep 60
# The drive hates this tape as it is. Give it a rest.
mt -f
/dev/rmt/tps1d6nrv fsr $blocks # However big rawfile is
already, we can skip that on the tape
dd if=/dev/rmt/tps1d6nrv bs=512 >>
rawfile # Let's get as much as we can
if [ $? -eq 0 ]
then
# If dd got clipped by a tape error, there's still work to do,
echo "dd exited cleanly" # if not, it must have
gotten to the end of the file this time
exit 0
# without a hitch. We're done.
fi
done
\ No newline at end of file
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
unixbr.gif

61.5 KB

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment