Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm backing up files on my server, but I'd like to know the location of the most important server configuration files. I.E. - if I lose everything on my server, but I want to come back with the same configuration settings for PHP, MySQL, CPanel, WHM, DNS, etc... - what folders must I backup to be sure I can have a smooth transition back?

Of course, the DB and all web-app files are backed up in other methods.

Thanks for the help.

CentOS5, CPanel/WHM, MySQL, PHP...

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

cPanel provides it's own backup facility, you can run it from shell/cron:

# /scripts/cpbackup --force

Configuration file resides in /etc/cpbackup.conf

MySQL database is usually stored in /var/lib/mysql, but it's safer to use mysqldump.

DNS configuration is located in /etc/named, but it's okay to backup /var/named too.

I also use etckeeper (can be installed from EPEL) to keep track of what was changed in /etc and optionally pull it with git/mercurial.

share|improve this answer
add comment

In general, /etc is the most important directory. In any Red Hat type system (as CentOS is), you'll find some settings in /etc/sysconfig, but that's pretty limited. Back up all of /etc to be safe.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.