0

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...

Shackrock
  • 208
  • 6
  • 16

2 Answers2

2

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.

Klox
  • 173
  • 1
  • 7
1

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.

Dmitry Alexeyev
  • 396
  • 1
  • 5