Backup all MySQL databases to gzip individually with mysqldump

I was always kind of disappointed with the mysqldump cron jobs I saw published because they always threw everything into a single backup file. Alternately I could call out each db individually, but that meant if I added another mysql database I had to update my script. When I started looking for shell scripts that I could run as a cron job (as opposed to say commercial tools, stored procedures, etc.) I kept coming up empty. So I came up with the following that backups all databases individually and then deletes any backups older than 30 days:


DATE=`date '+%F'`

ls -l $MYSQL_DATA -I mysql | grep ^d | awk '{print $9}' >> $TEMPFILE
DIR_LIST=( `cat "$TEMPFILE" `)

for i in "${DIR_LIST[@]}"
        mysqldump -u <mysql_backup_user> -p<password> $i | gzip > /backup/$i.$DATE.sql.gz

mysqldump --events -u <mysql_backup_user> -p<password> mysql | gzip > /backup/mysql.$DATE.sql.gz

rm -rf $TEMPFILE
find $MYSQL_BACKUP/*.gz -type f -mtime +30 -exec rm {} \;

Everything Bagels

Everything Bagel Topping
2 teaspoons poppy seeds
2 teaspoons sesame seeds
2 teaspoons dried garlic flakes
2 teaspoons dried onion flakes
1 teaspoon kosher salt

Bagel Recipe
2 teaspoons of active dry yeast
1 ½ tablespoons of granulated sugar
1 ¼ cups of warm water
4 cups bread flour
1 ½ teaspoons of salt

1. Add the sugar to the water, stir to dissolve then add the yeast. Let it sit for five minutes until the yeast has activated.
2. Add everything else. Beat in a stand mixer with a dough hook attachment for 10 minutes
3. Remove the dough from the bowl, oil it lightly, then return it to the bowl and let it rise for one hour
4. Cut the dough into 8 equal pieces. Shape them into rounds, then use your finger to make a whole in the center and stretch it until you have a roughly bagel shaped piece of dough
5. While doing this, start a pot of water boiling. Let the dough rounds stand for 20 minutes covered in a warm place
6. Preheat the oven to 425ºF. Boil each of the bagels for two minutes on each side (as many as you can fit in the pot comfortably)
7. As soon as you remove them from the water, sprinkle them with the seasoning mixture. Do it quickly as they dry out fast and you need the moisture to make it stick.
8. Bake them for 20 minutes

Sourdough Bread

Sourdough Starter
1 cup skim milk
3 tablespoons plain yogurt
1 cup bread flour

Heat the milk to 90-100 degrees Fahrenheit. Stir in the yogurt and place in a non-reactive container (glass quart jar works fine) with the lid on loosely. Let it stand in a warm place for around a day. Once the entire mix takes on the consistency of yogurt it is ready to use. Mix in the flour and place back into a non-reactive container. Let it stand on the counter for 3-5 days. You want a sour smell, though an aroma similar to beer is not unheard of. Bubbles will form so make certain the lid is on loosely. Some separation is expected but the surface should be clear – milky. If it ever takes on a pink or reddish tinge, it has gone bad and should be discarded. This generally happens if the container was not clean and contained bacteria. At the end of the 3-5 day stretch it is ready for use and is considered a fed starter.

Sourdough bread
3/4 cup fed sourdough starter
1/2 cup lukewarm water
1 teaspoon instant yeast
1/2 tablespoon sugar
1 1/4 teaspoon salt
2 1/2 cups bread flour

I cheat and use a stand mixer with a dough hook. You can make this by hand and get a workout too. This recipe provides a fairly sour sourdough. If you prefer one with a milder flavor, use less starter and more water.
Mix the starter with the water, sugar, yeast, and salt, along with 1 cup of the flour. Blend this with the paddle attachment for around a minute, just to get rid of lumps. Scrape the paddle clean and then put on the dough hook attachment. Add flour and run on low speed. The goal is to have the dough form into a ball that does not stick to the bowl. You’ll need to turn the mixer off and occasionally check the dough to see how wet it is. Once you’ve gotten the proper moisture content, let the mixer run for 5 minutes on medium-low speed. Check the consistency of the dough at the end of five minutes and add more flour if necessary. Run the mixer for another 5 minutes on medium-low speed. After it’s all said and done you want a dough that is smooth and springs back when you press on it.

Let the dough rise in a lightly oiled bowl for an hour in a warm, draft-free place. When doubled in size, turn the dough out onto a parchment paper lined cookie sheet. Spray the surface of the dough with water, then cover the dough with a stock pot or some other metallic object that is oven-safe. Heat the over to 425. Bake the dough for 10 minutes, then remove from the oven and spray the surface of the dough with water again. Cover with the pot/bowl and bake another 10 minutes. Remove it from the oven, spray it, cover it again and place it back in the oven for another ten minutes. At this point it should have baked for a half hour. Remove the bowl from the bread and let it bake for another ten minutes uncovered. The bread should be lightly browned when it is done. Remove it from the oven and let it stand for a half hour to cool off.

Vanilla Bean Cake

I did some baking tonight. The completed cake ended up delicious but was outrageously messy to decorate. Apparently there is such a thing as too much filling where cake is concerned. I was however incredibly pleased with how the yellow cake itself came out. This will give you two perfect sized thin-ish layers, but if you’re going for a typical height cake you’ll want to increase the amounts here by 50% and you’ll need a third cake tin. I filled mine with a blueberry caramel…at least I think that’s what I’d call it. I made a thin caramel and then added blueberries and vanilla bean. Then I frosted it with a lemon and vanilla buttercream. The cake is super sweet though so I think all the frosting and filling was overkill (seriously, my pancreas hurts) – If you top it maybe with some balsamic macerated strawberries (lightly sweetened) that would have been ideal. Overall though, I’m really the most satisfied with the cake portion of it. I’ve been monkeying with recipes for years to get a light, but moist yellow cake and I finally got it.

  1. Mix 1 tsp baking soda with 1 cup sour cream and set aside
  2. Blend 1 stick of butter (softened to room temperature) with 1 cup of white sugar until creamy
  3. Add 2 eggs, one at a time, to the bowl while the beater is running
  4. Add the seeds from 3 vanilla beans, and 1 tsp. vanilla and blend well
  5. Into the wet mixture sift 1 1/2 cups cake flour and 1 1/2 tsp baking powder and fold in gently just to start it combining. I used five or six folding stirs to get this going
  6. Fold in the sour cream mixture, trying to leave as much air in the mixture as possible
  7. Bake in two 8-9 inch round cake tins, that have been buttered and floured, at 350 degrees for 20-25 minutes

iTunes Won’t Close on Windows 7

This one was an easy fix though took me a bit to track down. Start -> Run -> services.msc and disable the Bonjour Service. Either through a bug in the music sharing component of iTunes or just a “helpful feature,” it won’t let you exit iTunes while the Bonjour service is running.

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress