Let’s talk about the effect of file multiplexing.

The effect of file multiplexing how many files/face if I were for example to back up database files per set one looks not connected to Oracle, okay you go in again I was about our balance with automation systems I said backup database files percent one right I’m now going to guess I’ve got about five or six data files I’m going to get five or six backup sucks that will typically mean that restore of one data file will be really fast but the backup itself is going to take forever and so swings and roundabouts consider how many open files you want to be fat too far multiplexing yep there you go one file per back obsessing so to conclude the report command will show you what needs to be backed up as a general rule the lesser command shows you what you’ve got then you’ve got your reality check and the maintenance right I’ll show you these scripts I’ve got here what we have this is taken from one of our production systems Armand daily backup door Sh nice I’ll expand the font.

We have a cron job that runs this script formats fonts and you’ll see don’t bother taking notes, by the way, you’ll see the scripts themselves in the next chapter but what this is doing is launching a bash shell sourcing dot brush profile stuffing in a state format remember I like to have dates formatted properly in armor setting the serge cut my path and now we’ve seen operating system command find dollar home JR our backups go to a direct on the server they go to a directory called JR I’m using em time plus 10 and sending the results to xargs depending how good you are with UNIX shell scripting what I’m doing is I’m finishing that directory for all files haven’t been modified for 10 days and every file hasn’t been modified for 10 days I’m removing so offering for some commands to delete stuff more than 10 days old and here for FID in I’m looping through a series of databases running on this machine those they’re fit none of these are just seen more by the way to Alden changed sense.

Because I’m looping through a set of databases as I learned through them due to dumb set the variable source the Orion be file arm on target and I’m running a script will see in the next chapter then I’m using sequel posts to dude guess what I’m running a script arm output or sequel and emailing the results to Bourbon to me that’s one long command so I’m running sequel plus to query something and email out the results then we run another arm and script log onto the target which I’ve along with the target I mean in the loop in the do loop and run our man daily maintenance, so those are two guts of the commands the two major commands we’ve got our Monday you back up and there’s our line daily backup and Platt that’s the one that does the backup launches this channel backup is compressed backup sighs restore validate you haven’t seen yet for they will do then I’m going on to email something or did our mundane are my output do our output this is format fonts watching okay.

It’s selecting outputs from that view read alarm an output read emails mm-hmm what is what have you sent down is this and when you’re doing your backup if you should allow mmm it depends precisely on your ILC in earlier religious it was shot down, of course, the bucket will fail and then you start it up run the backup again and it would start from the beginning in later releases is quite good realizing how far the backup ghost as starting up from where it left off so the exact time depends on your religious so does all that army back of your entry has to be running absolutely it’s got to be in mount mode at least I the mount mode or open why multiple so you’re doing a cold one which so you’re mounted right yes cold backups are done in mount mode so you’re doing mountain all you’re going to call back on the amount mole will that information will be in Iron Man in the output yes it will be in the output those be lost when you restart.

So if you did open it and I think you will survive when you open but we lost me to shut down so basically if you’re doing this sort of thing you want to do that immediately afterward to make sure you get white you well you wouldn’t have gone to the next day when you back that right yeah and the next day you’re right here but you’re going to shut down you won’t start up now there you want to learn your arm in the script, so then the information will be in that view it will be at that point for the next time showdown, of course, you’re looking yeah it on in a little okay correction okay so we’re doing that emailing out for us, ah what is the record is it recommended doing hot or cold they are the man I would always play hockey I would always do open backups why do you want to shut down your database why do it remember this as a general rule an Oracle database will perform better the longer is running.

Now if you do Sean down starts up bounce back up or sir the base open if you do that every day every day is losing all the information accumulated in our sequel execution and things it generally speaking you don’t want to shut it down unless you have took now the hot backups are absolutely rock solid you don’t have to worry about us okay the next course I’m running is that makes and scripts my daily maintenance scripts is doing this that’s all commented out because that was going to the tape library I’m launching this channel I’m doing a cross-check delete no prompt expired and that’s going to be doing something every day because our earlier scripts or deletion phone so we want to tell our man to see what files have been deleted and removed our references and then we delete no prompt obsolete which will get rid of I can’t remember what the configured retention is on this that will get rid of the old backups any that haven’t been removed already because of that and of course delete archive log all.

And that will not happen depending on the archive log deletion policy and then because I need backup gun control file and we also bill so Ronnie’s been configured regarding then do the binding in the room didn’t we yes it is theoretically and to delete obsolete will be enough but what you can sometimes find if scripts fail for any reason may be an iron doesn’t run them correctly or something that you might have stopped hanging about if the cron job failed and this backup wasn’t wrong well then I won’t be deleting things so I want a clear them off from here anyway but you’re right it doesn’t redundancy here Bessemer understands the final line just replaced by the way that’s copying everything to take with the no delete switch and you’ll see fully worked examples of this script in the next chapter I just wanted to show the commands they’re using across the significance of the cross-check expired and options.

Leave a Comment