RE: ONTAPE as cron script (error)
Posted in 1997
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------ =_NextPart_000_01BCF5AA.AF799EC0
Content-Type: text/plain;
charset="iso-8859-1"
Thanks, Sujit. I'm going to give it a try, and I'll let you know how
it works out!
=============================
Paul Mosser, Open Systems DBA
Wells Fargo Bank
Tempe, Arizona, USA
mosserp@wellsfargo.com
} ----------
} From: Sujit Pal[SMTP:spal@scotch.den.csci.csc.com]
} Sent: Thursday, November 20, 1997 11:55 AM
} To: 'mosserp@wellsfargo.com'
} Cc: 'informix-list@rmy.emory.edu'
} Subject: RE: ONTAPE as cron script (error)
}
} Paul
}
} Yes you can use compress. My original script used compress until I
} found that gzip was MUCH, MUCH better. Just replace gzip with compress
} in the script.
}
} Also you would need to use split if the size of your **compressed**
} archive exceeds 2GB (Andreas correct me if I am wrong) because your
} Unix lseek will read only 2^31 bytes before returning -ve offsets.
} Based on some measurements of actual compressed sizes versus the
} actual size of the dbspace, I find that a compressed level 0 backup
} (for my data) never exceeds 20% of the total used raw disk space and
} level 1 and 2s never exceed 5%. I realize that this depends on your
} data and your load, but going by my data, I could have at least a 10
} GB database before I needed to worry about splitting the file.
}
} In case you still need your compressed archives split, then replace
} the line:
}
} gzip - < $DUMPDIR/$bkdev >$DUMPDIR/$bkdev.gz &
}
} with
}
} gzip - | split -b512m < $DUMPDIR/$bkdev >$DUMPDIR/$bkdev.gz &
}
} This will create files xaa, xab, etc (unless you specify a name in
} split) of 512MB each in the current directory, and nothing in the .gz
} file. You may have to put in extra code for maintaining these files,
} and restore will require some extra effort, by linking a TAPEDEV to
} each of these devices in turn.
}
} HTH
}
} Sujit
}
}
} ----------
} From: mosserp@wellsfargo.com[SMTP:mosserp@wellsfargo.com]
} Sent: Wednesday, November 19, 1997 3:50 PM
} To: andreas.zeugswetter@telecom.at
} Cc: informix-list@rmy.emory.edu
} Subject: RE: ONTAPE as cron script (error)
}
} Andreas,
}
} This looks very promising to solve a big headache that we have
} right now!!
}
} Environment:
} -- DEC UNIX ver. 3.2G (soon migrating to 4.0b)
} -- Informix ODS 7.20.UC3 (soon migrating to 7.23.FC4)
}
} Currently, every week night we do a L0 archive to disk. Since
} the archive exceeds 2gig,
} we have to use the following procedure (TAPEDEV set to
} /archive/archive.file, with size 2000000):
} 1) from first telnet session:
} ln -s file1 /archive/archive.file
} 2) from second telnet session, start the:
} ontape -s -L 0
} 3) when file1 reaches 2gig, ontape asks for the next "tape";
} then switch back to first session:
} rm /archive/archive.file
} ln -s file2 /archive/archive.file
} 4) switch back to second session, and hit <CR> to continue the
} archive
}
} Naturally, I want to automate this process. But I haven't been
} able to figure out how to script the two-session aspect.
}
} Your comment below about "split -b512m" makes me think that
} there is a way around the 2 gig limit!!?? What exactly do I need to
} change in Sujit's script? What do I need to change in Tape parameters
} in onconfig? Any other changes needed anywhere (e.g., UNIX config)?
} Also, will the standard "compress" work in place of gzip (yes, I've
} used gzip at other sites, and I like it, but I'm not sure if our sys.
} admin. group would allow gzip to be installed).
}
} Many, many TIA!
} =============================
} Paul Mosser, Open Systems DBA
} Wells Fargo Bank
} Tempe, Arizona, USA
} mosserp@wellsfargo.com
}
} ----------
} From:
} andreas.zeugswetter@telecom.at[SMTP:andreas.zeugswetter@telecom.at]
} Reply To: andreas.zeugswetter@telecom.at
} Sent: Wednesday, November 19, 1997 10:42 AM
} To: informix-list@rmy.emory.edu
} Subject: Re: ONTAPE as cron script (error)
}
}
}
} Hi,
}
} We use a very similar approach as you do and since you
} were so nice to
} the community I would like to warn you of problems with
} your script.
}
} kill -9 $bgpid
} is very dangerous, since it could cut off some
} pages from the end of the backup.
} You need to replace the line with:
} wait $bgpid
}
} This will wait for gzip to finish after the pipe is
} closed
} by ontape.
}
} I also use split -b512m after the gzip, because our
} backups
} are larger than 2 Gb.
} We also use gzip --fast because it compresses nearly as
} good
} and gives much better performance.
}
} best regards
} Andreas
}
}
}
}
}
}
}
}
------ =_NextPart_000_01BCF5AA.AF799EC0
Content-Type: application/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