1
0
Fork 0
My old website. I completely made this one in bash-scripting.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

10 lines
485 B

<b>How to backup a MySql database</b>
To backup all your databases from MySql, I made the <a href='__SITEURL__/scripts/sqlbackup'>this script</a>.
You can run this script from your crontab. Run this every night and it will dump
all of your databases added with a date into the directory /backup/sql You can
also remove the very old ones by crontab. My crontab looks like the following:
0 0 * * * find /backup/sql/ -mtime +5 -exec rm -rf {} \;
0 0 * * * /usr/local/bin/sqlbackup