Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
1  
Possible duplicate of Comparison of backup tools –  belacqua Apr 16 '11 at 5:29
    
I think, this question is more spesific. –  Vassilis Apr 16 '11 at 8:16

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
So when using rsync+ssh, do you tarball or compress the files first, or just copy them off as is? –  Brettski Apr 16 '11 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 '11 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 '11 at 22:52

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.

share|improve this answer

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.