Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Please dont remove this Folder, It occupies only 315 MB and is useful for your Office 2003.... SRIKANTH
- that still wont work and i got no idea about registery could use help
- Thanx for help
- Thought I would have to get out my regestry editor, should have checked the settings first XD.
- thanks! it's very helpful.
Tech-Recipes
Cookbook of Tech TutorialsMySQL - Daily database dumps, all nicely sorted. | MySQL | Tech-Recipes
Started by qdideas · 9 months ago
5 years ago
5 years ago
Ellen
5 years ago
for DATABASE in `cat /etc/db-backup/db-list.txt`with the following
for DATABASE in `echo 'show databases' | mysql`5 years ago
this is for user root with no password, if the user root has a password add '--password=' followed by your password INSTEAD of just putting '-p'
I've tried using '-p' but then I got the password prompt.
5 years ago
this is for user root with no password, if the user root has a password add '--password=' followed by your password INSTEAD of just putting '-p'
I've tried using '-p' but then I got the password prompt.
try using -ppassword
instead of -p password.
4 years ago
for DATABASE in `echo 'show databases' | mysql -p`--column-names=false should be added so that "Database", which is the column name, will not be included in the list.
Thus...
for DATABASE in `echo 'show databases' | mysql --column-names=false -p`<ul id="quote"><h6>Anonymous wrote:</h6>If you want to back up *every* database on the server, then replace this line
for DATABASE in `cat /etc/db-backup/db-list.txt`with the following
for DATABASE in `echo 'show databases' | mysql`</ul>
1 year ago
I am also looking for a reliable and dependable solution to backups my databases on the server and want to keep each backup for atleast 15-30 days.
I guess the solution mentioned here is more reliable than the ones available with php scripts.
Can you tell me the command to be executed on cron tab to take daily backups at a specified time?
Thanks.
1 year ago
Can you please tell me exact script with following parameters:
1. Type of hosting: shared
2. Objective: to backup every database and keep them for 15 days
3. Backup folder: /home/myid/db-backups
4. etc folder is located at /home/myid/etc
5. UserID: hello, password: iamok
Please also tell me the command to be executed on cron tab to run your sh script, thanks.
4 months ago
1 week ago
For our requirement, we were taking two level backups = Daily backups and Monthly backups. The daily backups are recycled every week and monthly backups are stored for much longer duration [As a matter of fact, we have not yet deleted them for past 3 years]. Of course, our backups are only 200+ MB now.
So we have ended up with:
01-2008.dmp, 02-2008.dmp, 03-2008.dmp, ... 05-2009, 06-2009.dmp, etc and seven daily dump files = Mon.dmp, Tue.dmp, Wed.dmp, ... Sat.dmp, Sun.dmp
We used `date +%e` to get the day of today. We used `date +%0m` to get month and `date +%0y` to get year.