Linux – the best way to backup a standalone linux server

backuplinuxscripting

I have a standalone linux IDS system that I have been putting together. It runs MySQL locally, as well ntop, nagios, base, snort, apache etc. I want to be able to make a backup of the system that has everything from the old system so that I can do a quick dd from a static image of the system and then restore it to the last state.

To my knowledge I cannot DD a live system, which leaves me at a loss as to how to get everything from the server backed up.

I have never used rsync in the past, and I think it may be the solution, but I am not certain that I can use that on a live mysql DB.

I am pretty sure this is going to need a layered approach, but any input would be helpful.

edit:

The systems being monitored are low traffic most of the time, and apache is only for the web UIs for the applications, so its not as overloaded as it may seem

Best Answer

For mysql you can use mysqldump to dump the database contents to a file. Other than that, you usually only need to back up the config files (/etc and any other directories you modified), any other data directories, log files, and the list of installed packages. You should be able to restore the system by doing a fresh install of the OS, installing the packages from the list, and replacing the data and configuration files.

Related Topic