Rückseite: 1/2 von Großbritannien. Männer würden oben Geschlecht für einen Fernsehapparat?! geben?
Vorwärts: Was Soju ist und wie es das Leben eines Entrecard (AB) Benutzers beeinflußt
DIY Linux web server KERBE - automatisieren Sie Ihre MySQL MySQL Datenbankunterstützungen
O.K., habe ich engagierte Bediener für Paarjahre jetzt laufen gelassen und ich pflegte, mit Linux Kästen zurück in der Hochschule herum zu verwirren.
Ist hier ein wesentlicher automatischer Index und ein cron Job, die Sie zwecks Ihre Unterstützung automatisch halten müssen.
Ja wenn Sie einen engagierten Bediener erhalten, erhalten Sie nicht ihr dummes Extra$15/month für das Unterstützen Ihrer Datenbank. (Alles, das sie, ist bilden Indexe wie dieser und aufladen Sie für es)
Sie können diesem Beispiel folgen und zu gehen geben Sie dieses Geld für Trödelnahrung aus.
So alles, das Sie tun müssen, ist ftp Ihre Sicherungsdateien.
Dieses ist die Weise, die besser als, einsteigend in Ihr phpMyAdmin und von der Netzschnittstelle downloadend ist, da die Akte bereits bereit zu Ihnen ist zu downloaden.
Ist hier, wie Sie es tun:
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.
If you like this post then please subscribe to my full feed RSS. You can also subscribe by Email.
Got a new hack, DIY, howto, or gadget? Tip us here.
Search for a Hack:
Bookmark It!
|Digg it |SiteHoppin |Wagg It |
Related Posts
- Zedomax Server Upgrade Complete!
- Data Browser allows you to manipulate MySQL database in a Snap!
- DIY Wordpress HACK - How to decrease the load on your Wordpress blog by 5 factors!
- Why not host yourself
- DIY Linux DoS HACK - HOWTO Limit your the max number of TCP connections to your Web Server!
TrackBack
Email this to a Friend
Email This Post



























Very useful script. Thanks.
http://packratstudios.com
glad it helped!
To further automate the process of backing up, you should set up a LOCAL cron job that downloads the file to your computer.
Which is just as easy…. all ya do fetch the remote file:
wget ftp://Username:Password@www.yoursite.com/backup/sqlbackup.tar
true, that’s if you are using Linux…wait a minute, why am i not using linux!?!
Cool script.
I’ve always used a software product to backup my DBs - it was something like database backup generator.
You set it to run daily and it’ll back up, email you a download link, and also store as many backups as you need.
The thing I liked was that you could restore the DB with one click from the admin panel.
Craig