Use water heater water when input supply has been shut off
Step one, very important. Shut off the heat (electric supply or gas) to the water heater before draining it. An empty or partially empty water heater can be very quickly destroyed if heat is applied while it's not full of water.

Then drain into a bucket from the drain valve, opening the highest hot water tap in the house  to let air in if the heater is below the rest of the plumbing.

If the heater is above other plumbing, you can open the highest hot water fixture and then fill from a lower hot water fixture, or possibly hot or cold water fixture depending on possible check valves, etc.

When water supply is restored, run the hot water taps until all air is purged from the water heater BEFORE restoring power or turning on &amp; re-lighting gas supply to it.