Article Title: Are you ready? Back up your Linux system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. What do we need to back up?
My Linux system is based on Redhat's Redhat Linux 9.0. It also configures basic services such as MySQL, PHP, and Apache, and is equipped with Awstats, MRTG, MT, and other application services. Therefore, in addition to important system files, we also need to back up databases, log files, and statistical data files. Of course, the other one that is essential is the./configure parameter when compiling various services, which will not be described here.
2. Create a list of backup files.
This step summarizes the list of directories to be backed up. Below I made a simple list according to the various services I installed. The address of some files is based on my server (starting with "/"), and some are described as relative directories (starting ).
System:
/Etc/usr/local/etc
Contains all core configuration files. This includes network configuration, system name, firewall rules, users, groups, and other global system items.
/Var
Contains information used by the system daemon (service), including DNS configuration, DHCP lease period, Mail Buffer file, HTTP Server File, db2 instance configuration, and so on.
/Home
Contains the default home directories of all users. This includes their personal settings, downloaded files, and other information that users do not want to lose.
/Root
Is the root user's home directory.
/Opt
Is where many non-system files are installed. The IBM software is installed here. OpenOffice, JDK, and other software are installed here by default.
Directories that do not need to be backed up in the system:
/Proc
Never back up this directory. It is not a real file system, but a virtualization view that runs the kernel and environment. It includes files such as/proc/kcore, which is a virtual view of the entire running memory. Backing up these files is just a waste of resources.
/Dev
Indicates the file that contains the hardware device. If you plan to restore to a blank system, you can back up/dev. However, if you plan to restore to an installed Linux system, it is unnecessary to back up/dev.