What are the vital files and folders that should be backed up before a re-install or a server migration?


When I re-install Linux on my systems, usually only to do a fresh upgrade, I back up the following:
/etc
/var
/root
/home
/usr/local (sometimes contains custom scripts or binaries)
/usr/share (see note below)
/www (if it exists)

ALSO, if you have any MySQL or other SQL databases, you should probably do a database dump to flat files for importing back in your new installation.
The directory /usr/share sometimes contains irreplacable files, such as Wine's /usr/share/wine-c, which is the virtual C-drive for your Wine-installed Windows programs. If you are not using wine, it is probably safe to ignore this folder, as it usually contains alot of replaceable stuff. This would probably save you about 800MB of storage, depending on the size of your installation and the type of storage used for your backup.

Once you get your fresh install done, you can copy these files somewhere on your new fresh system for easy retrieval. For you or your users, most settings will be stored in ".*" files in the home directory (such as ~/.mozilla for your Mozilla browser settings). Just drop these in to place on your new system to restore the previous settings.

AND DON'T FORGET! Let me know if this helped you by sending me a short email at linuxtips.backup@john.holmstadt.com!