I am running a Ubuntu web server. I have a backup script working that will dump mysql and svn and backup both of those along with the files in the /var/www folder and store it on S3. What else should be backed up?

Currently, I am running the following:

  • Apache
  • MySql
  • Subversion

Eventually I may play with other things.

link|improve this question

What services are you running? SVN, WWW, what else? – ghm1014 Jun 21 '11 at 17:32
feedback

2 Answers

up vote 2 down vote accepted

The best way to determine what you need to back-up is to walk through a scenario where your server's hard drive is no longer booting up.

What data would you require to bring it online as fast as possible?

This is a basic template (tailored to *BSD) that I use:

Files:

/etc/ssh
/var/log
/var/cron
/etc/ipfw.rules (ip tables in your case)
/etc/syslog.conf 
/etc/motd
/etc/ssh/banner
/etc/shells
/etc/profile
/etc/login.conf
/etc/group
/etc/hosts
/etc/passwd
/etc/sysctl.conf
/etc/resolv.conf
/etc/rc.conf
/etc/rc.local
/etc/crontab
/etc/master.passw

Dirs:

/var/cron

If you are running other services; you should back-up those configurations as well.

link|improve this answer
Should I just backup /etc? – Mike Wills Jun 22 '11 at 13:50
You can, but in most cases it's an over kill. You can just back-up / then :) – Aleksey Korzun Jun 23 '11 at 16:07
feedback

For each service, you need to backup:

  • Apache:

    • /var/www/html (and any other place where you store this kind of files)
    • /etc/httpd (I think it's /etc/apache2 in Debian's like)
  • MySQL:

    • mysqldump and binary logs if present
    • /etc/my.cnf
    • Optional you may backup /var/lib/mysql
  • Subversion:

    • Repository directory
    • Permission files
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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