First, determine the content to be backed up
During system backup and restoration, the file-based nature of Linux has become a great advantage. In Windows, the Registry is very related to the system. Configuration and software installation not only put files on the system. Therefore, restoring the system requires software that can handle features such as Windows. In Linux, the situation is different. Configuration files are text-based and, apart from directly processing hardware, they are largely irrelevant to the system. The modern approach to hardware drivers is to make them available in the form of Dynamically Loaded modules, so that the kernel becomes more irrelevant to the system. Different from the complex details about how to install the operating system on the system and hardware, Linux Backup processes package and package of files.
Generally, the following directories need to be backed up:
·/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 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.
Some directories should not be backed up.
·/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.
Other directories include system files and installed packages. In the server environment, many of the information is not customized. Most of the custom settings are in the/etc and/home directories. Including:
In UNIX or Linux systems, most system configuration files are located in the/etc directory, but you should consider backing up all possible files and possible locations, including:
DNS domain information (/var/bind );
NIS/NIS + file and configuration (/var/yp)
Apache or other Web server configuration/var/apache,/etc/apache or/usr/local/apache );
Email files or folders/var/mail and/usr/mail)
Lightweight Directory Access Protocol (LDAP) server data/var/ldap or/usr/local/ldap );
Security Certificate;
Custom kernel driver;
Kernel configuration or build configuration and parameters;
License key and serial number;
Custom scripts and applications;
User/root login script;
Email configuration. In particular, if you use a solution such as Cyrus Internet Message Access Protocol (IMAP), special records and indexes are performed on the user mail folder.