3

I am a Windows administrator standing up an Ubuntu Server for some intranet LAMP applications. I have read through some of the Ubuntu documentation but am not clear on a good way to get backups of the system. Obviously what I would like to do is be able restore the application data (and perhaps applications) if an issue occurs to the box. I would like the schedule the backup to run daily.

What are (is) the recommended way to backup up an Ubuntu server?
Am I able to direct backups to a network share where they will be put to tape?
What is involved in restoring the data?

2

2 Answers 2

3

It really depends upon what your backup requirements are. Are you considering backup of entire machine, just userdata, perhaps app data, maybe mySQL data, etc?

Linux admins commonly use tools like Rsync with combination or ssh, at times for added security to do file level backups. Of course, if you have a virtual environment, maybe you are backing up whole datastores.

So, maybe the question is are you considering file-level, and if so entire OS, or just some data directories? For typical data directories rsync+ssh is really commonly seen. When it comes to mySQL, there are countless scripts on the internet to dump that data into a file, and then again, using rsync+ssh to transfer that data. I personally am a fan of NFS, and all data remains on NFS, which just happens to be backed by a SAN. I use what I preach. I work for Nexenta, and use our SAN solution for all data, and backups. Backups in my case are done on the SAN, simply using snapshots and cloning.

3
  • So when using rsync+ssh, do you tarball or compress the files first, or just copy them off as is?
    – Brettski
    Apr 16, 2011 at 3:09
  • I like the simplicity of using Rsync to copy files to where ever so those files can be archived. I figure a more robust solution will be required if we stand up more servers.
    – Brettski
    Apr 19, 2011 at 3:00
  • I think with rsync+ssh it is much easier to do a mirrored copy, and use rsync to continue maintaining synchronicity. That said, methods vary, depending upon need, and restore procedures.
    – slashdot
    May 8, 2011 at 22:52
1

You say this is for LAMP applications (only?). In that case, you probably just need to backup the MySQL database(s), and the contents of /etc. The former should be backed up with a script specific to MySQL (backing up the MySQL data directory directly risks backing up an inconsistent database state), while for the latter, any technique can be used, even cp -a, because /etc is quite small.

OK, a third thing to backup might be the applications themselves, but this is not so important because presumably you can just download them again if necessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .