When configuring daily backups, which files should I include to be sure I have the MySQL db's
I have a dedicated LAMP server with cpanel hosting 100 websites (some of them have MySQL db's).
I a开发者_C百科m currently using the Jungle Disk Server Edition to backup our files from our LAMP server to Amazon S3.
Once a week were are backing up the entire cpanel which is an enormous strain on resources but that is a separate issue.
Now, what I want to do is to set up a daily job to backup just the HTML files and the MySQL db's.
If I just backup the "public_html" folder will my MySQL database info be stored in that directory? Would backing up the public_html folder be enough to recover the db?
I can find plenty of resources online about how to manually backup MySQL db's but with a 100 sites, I need it automated. I'm hoping for an easy solution where I can just grab a folder to backup each day.
If I just backup the "public_html" folder will my MySQL database info be stored in that directory? Would backing up the public_html folder be enough to recover the db?
No, definitely not. The MySQL data files are usually located in something like /var/mysql
.
But you probably shouldn't be backing up the data files directly anyway. It's better to create dumps using mysqldump
(or mysqlhotcopy
) and backup the resulting dumps.
精彩评论