I have an electric dryer with a 30 amp circuit running to it. If I had a male-male plug to run from a portable generator to this outlet, would it be safe to run essential appliances (water pump, refridgerator, sump pump, etc) during a power outage as long as I tuned off the main breaker and the total draw was less than 30 amps?
ABSOLUTELY NOT!! This is NEVER an option.
You MUST use some form of transfer switch or interlock, along with the proper male inlet. Also, a male-to-male cord is called a "suicide cord" for a reason.
The transfer switch that MUST be used - as pointed out by Speedy - is essential that it be properly installed in conjunction with how the utility / house wiring is installed.
The transfer switch and interlock mechanism is essential for the safety of both you and for the utility folks that may be working on downed utility lines. With out a proper interlock and transfer switch your generator would be feeding out onto the mains lines and could very well kill someone. People who try to short cut and cheap out on installing a generator hookup correctly always think that they can remember to cut the main breaker before starting up their generator. But the plain fact that rules and regulations exist for use of transfer switches and interlocks proves that people make mistakes despite best intentions.
I worked as a high voltage lineman for 30 years and have seen all kinds of squirrelly generator set ups. It is never a good idea to plug your generator into your home's wiring even if your turn your main off. NEC requires that a transfer switch be used. I have seen more than a few main breakers that had failed and were still on when they showed off. If you do not have a transfer switch, you risk sending power back through your breaker and meter, back to the transformer, and stepping 120 volts up to line voltage. No a good thing for the linemen out in the middle of the night, in bad weather, trying to restore everyone's power.
I was told by an electrician that the mains breaker does not disconnect the neutral line, only the two halves of the 240 volt feed. Thus you are still connected to the grid.
A transfer switch will isolate everything.
Can you? yes it is possible, it will probably even work. Is it a really bad idea, yes. Is it criminally illegal, probably not as long as you are sure to flip the breaker. Is it against code, yes. As others have said use an interlock, or if you need to do it cheaper, buy extension chords for your 3-4 critical appliances and use them.
I have used a generator backing up through an "outlet" that I also use for welding for decades; that breaker is always off until it is needed for one operation or the other. I have marked every breaker that I want to run off the generator and turn off all the others along with the mains breaker. There is no problem, as long as you do that. Of course, I am the only person who is capable of hooking up the generator and running it, so there is no chance of someone else running into a problem. The only time an interlocking transfer switch is absolutely needed is if the generator automatically comes on when the power goes off.
This is NEVER an option.
Sure it is. Done in farms across the land.
There is nothing inherently wrong with a male-male cord. It is obviously dangerous, but only to people dumb enough to wave the pointy end around while it is plugged into a live circuit.
Similarly, the transfer switch is for people who can't figure out how to turn the main breaker off. If you have a large (100 amp) generator in the garage it is a convenience.
You will not be re-energizing the electrical grid. Circuit breakers work in both directions, and the combined load of your neighbors plus the transformer will most certainly exceed the dryer's or generator's rating and trip a breaker.
Things you genuinely do have to be concerned about:
Dryers have 2 hots and a neutral. Does the generator provide 2 phases? If yes, great. If no, connect the red and black to the generator's live wire but also disable any 240v appliance, like a stove or air conditioner. Presumably the dryer is also disabled by virtue of it's plug being in use by the generator.
Welders are 240v only. Do not use a 3-pin welder plug for a generator - the absence of a neutral will have very strange results, like the hallway light only working when you turn on the toaster.