DIY Linux Web Server HACK - Automate your MySQL MySQL database backups
Okay, I’ve been running dedicated servers for couple years now and I used to mess around with Linux boxes back in college.
Here’s an essential automatic script and a cron job you will need in order to keep your backup automatic.
Yes, if you get a dedicated server, don’t get their stupid extra $15/month for backing up your database. (All they do is make scripts like this one and charge you for it)
You can follow this example and go spend that money on junk food.
So all you have to do is FTP your backup files.
This is way better than going into your phpMyAdmin and downloading from the web interface since the file is already ready for you to download.
Here’s how you do it:
1) Make a new file called backup.sh in your home directory. 2) Use the following syntax:
mysqldump -u[USERNAME] -p[PASSWORD] –opt [DATABASE NAME] > /root/backup/DATABASE1.sql
Here’s an example backup.sh file if you had 2 databases:
mysqldump -uUser1 -pPassword1 --opt Database1 > /root/backup/Database1.sql mysqldump -uUser2 -pPassword2 --opt Database2 > /root/backup/Database2.sql tar cvf /root/backup/sqlbackup.tar /root/backup/*
You can test your script by typing this:
sh backup.sh
(The mysqldump will overwrite the older file if you run this more than once)
3) If everything is working good, now you can put that script to be run once a day in your cron job.
For Fedora Core, you can edit this file /etc/cron.d/sa-update
Add the following line:
10 3 * * * root sh /root/backup/backup.sh
This will execute the script once a day at 3:10AM.
Now simply download one tar ball file whenever you feel like backing up your database.
You can probably change this a little bit and use it for many other things like backing up all your files too. (which I do)
If you have multiple servers like me, you can also automate your scripts to download backup databases to each server. That keeps things real redundant in case of server failure.
Related posts
DIY QUICK HACK - HOWTO make a bathroom ventilation fan using a PC fan in just 1 minute!

Okay, I haven’t been doing much DIYs but here’s a fun one for your bathroom.
Here’s the story:
My bathroom has a vent but no fan. Everytime I shower, the vent does not work well enough to ventilate the bathroom of the fog generated.
So, I decided to build a small little bathroom ventilation fan using some PC fans I had laying around the house and a 12 DC adaptor I also had around.
What you need:
1 PC Fan
1 12V DC Adaptor (You probably have one laying around the house too, you just don’t realize it. Look at the label of any old adaptors you have and find the one that says 12VDC. (9 to 15VDC works too)
2 screws (something to mount your PC fan onto your bathroom vent.
Now, just watch the video and see how simple it is to turn household junk into a useful bathroom vent.
Click Here to View in Full Screen Mode
Related posts
Zedomax Christmas Wreath now on… Lifehacker!
TIgHT! We are on Lifehacker!!! Although it’s been almost a year since we last made that Christmas Wreath! Happy Holidays everybody!
Special Thanks shotout to Tamar Weinberg for featuring it as a Weekend Project. You made my weekend!
Related posts
Our LED Christmas Wreath has virally spread over the internet

Click Here to View in Full Screen Mode
In case you have been missing out, our LED Christmas Wreath has been “virally” spreading over the internet without our knowledge. Some people are even making money off our videos but we like it since it’s being virally spread everywhere.
Well, we just wanted you to know that this can be made by simply following our direction here.
Related posts
Christmas DIYs - Go make yourself one of Zedomax’s LED Christmas Tree!
Click Here to View in Full Screen Mode
Wow, it’s been almost a year since we’ve made some Christmas DIYs. To bring them back to life, we are featuring it here again and well tell you to go make yourself one by following our directions here.
BTW, we are going to go buy a real Christmas tree this year. (Well it’s plastic but not LEDs…)
Related posts
Halloween DIYs - Pitchfork LED, Talking Halloween Basket, and spinning wireless thingee
Pitchfork LED! 
Although we haven’t been doing much DIYs lately, you can check out the Pitchfork LED for ideas for this Halloween!


Here’s the really cool spinning bluetooth wireless hoverboard!
Now if you are really serious, you can make this talking Halloween basket using couple LEDs and a CUBLOC chip.
Hmmm…I just can’t think of anything this year so you are going to have to review our last year’s DIYs for now until my thinking block is gone…
Videos:
Click Here to View in Full Screen Mode
Click Here to View in Full Screen Mode
Click Here to View in Full Screen Mode
Wow…I just can’t believe I made those things…but I am proud now…
Related posts
Live Blogging - Zedomax Booth at Maker Faire



Hey we are live at the Maker Faire, blogging live! See our automated camera that follows people? Well, it’s a $160 Logitech camera we got in a hurry at Best Buy last night just before the store closed. Glad we got it working although the internet here sucks sometimes. Anyway, our booth is really popular!
Garrett is doing a great job with the crowd while I am hiding in the back. (Why am I hiding? Blogging of course!)























