1

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.

Mike Wills
  • 834
  • 6
  • 19

2 Answers2

2

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.

Aleksey Korzun
  • 276
  • 1
  • 4
2

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
ghm1014
  • 944
  • 1
  • 5
  • 14