In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the method of Linux backup and recovery". In the daily operation, I believe that many people have doubts about the method of Linux backup and recovery. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Linux backup and recovery method". Next, please follow the editor to study!
No matter what the system, the safest thing to do. After debugging, make a backup. If you encounter any major problems at that time, it will be convenient and convenient to restore them directly. The following details of Linux backup and recovery methods:
Backup and recovery system undertakes the functions of pre-backup and post-recovery. In the current rapid development of the network environment, any information system on the network can not guarantee absolute security. As long as the network exists, there will be all kinds of threats from the network. In order to resist the attacks and intrusions of the network, although we have introduced increasingly mature intrusion detection systems and firewall systems, the intrusion means of hackers are becoming more and more sophisticated, and they can always find the security loopholes and deficiencies of these systems to invade, so the security incidents caused by network intrusion are increasing year by year.
In this case, it is difficult for us to ensure the absolute security of the key systems in the network, so we need to adopt backup and recovery technology. Backup and recovery technology is to use storage media and certain strategies to back up the system business data regularly to ensure that the accidental loss of data can be recovered as soon as possible and reduce the loss of users to the lowest point. It is a very important core technology in the discipline of information security.
Backup Technology under Linux
For backup and recovery, Linux provides tools such as tar, cpio, dump, and so on. In this way, users do not need to spend money to buy, according to the actual situation of the system, combined with the use of the corresponding backup and recovery tools to achieve the basic functions of backup and recovery.
Introduction to tar tools
Tar is a classic Unix command that has been migrated to Linux. Tar is an acronym for tape archive (tape archiving). It was originally designed to package files on tape, but now we mostly use it to back up a partition or some important file directory. We can package the entire directory tree with tar, which makes it particularly suitable for backup. Archived files can be restored in full, or individual files and directories can be expanded from them. Backups can be saved to a file-based device or a tape device. Files can be redirected on restore to relocate them to a different directory (or system) from the directory (or system) where they were originally saved. Tar is file system independent, so it has a wide range of applications, and it can be used on ext2, ext3, jfs, Reiser, and other file systems.
Using tar is very similar to using file utilities such as Winzip and WinRAR in Windows environments. Simply point it to a destination (which can be a file or device), and then specify the file you want to package, and you can dynamically compress the archive file with a standard compression type, or specify an external compressor of your choice. To compress or extract files through bzip2, use the tar-z command.
Here is a simple example of using this tool for data backup:
Tar czvf-/ root/code > / tmp/code_bak.tgz
(package and backup all program files in the / root/code directory to / tmp/code_bak.tgz)
Tar xzvf / tmp/code_bak.tgz / root/code
(restore the backed up directory files to the specified directory)
Introduction to cpio tools
The cpio command can copy or copy files from tar or cpio archives. The cpio command is compatible with the tar command, but this command has some features that the tar command does not have, as follows:
● supports both cpio and tar file formats.
● supports many old tape data formats
● can read the file name through a pipe (pipe-line).
At present, it seems that only a few Linux packages are distributed in cpio format. Users who are interested in the details of the cpio command can read its manual through the "man cpio" command.
Introduction to dump and restore
Dump can perform functions similar to tar. However, dump tends to consider file systems rather than individual files. Dump examines the files on the ext2 file system and determines which files need to be backed up. These files will be copied to a given disk, tape, or other storage media for security reasons. On most media, capacity is determined by writing until an end-of-media tag is returned.
The program that works with dump is restore, which is used to restore files from the dump image. The restore command performs the reverse function of the dump. You can restore a full backup of the file system first, and subsequent incremental backups can be overwritten on top of the restored full backup. Individual files or directory trees can be restored from a full or partial backup.
Both dump and restore can run on the network, so users can back up or restore from a remote device. Dump and restore use tape drives and file devices that offer a wide range of options. However, both are limited to ext2 and ext3 file systems. If you are using JFS, Reiser, or other file systems, you will need other utilities, such as tar. For example:
Dump 0f / dev/nst0 / (back up the ext2 file system to the first SCSI device)
Restore-xf / dev/nst0 / home/code
(restore all data in the / home/code directory in the backed up SCSI device to disk)
In addition, there are commercial storage backup tools such as Tivoli Storage Manager on the market, these are visual tools, and users can easily achieve backup and recovery through the user interface. It is worth noting that this is a commercial software, so it is not free, for many users, the function it provides is similar to the backup and recovery tools that we have in Linux, but more user-friendly and user-friendly, so that users can get rid of the boring command line way, thus convenient for users to use.
At this point, the study of "the method of Linux backup and recovery" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.