Linux backup commands are commonly used in full backup tools, including tar, cpio, and dump. The biggest benefit of cpio is that it can be copied to common device files, so using cpio for full backup is a great choice. However, it should be noted that cpio can work normally only with the help of find or other commands that can find files.
1. use cpio for backup and reverse backup [root @ test/root] # find/-print | cpio-covB>/dev/st0 <= back up to tap [root @ test/root] # cpio-iduv </dev/st0 <= use a tap to save the data back to the system. 2. use tar to back up [root @ test/root] # tar-zcvf host.tar.gz/-- exclude/proc -- exclude/mnt -- exclude/tmp [root @ test/root] # tar-zxvf host.tar.gz for some backups, we will describe it with a simple tar. Assume that the data we need to back up is a daily MySQL database, because I want to save the data every day into different files, and the old and new files are the simplest to distinguish between dates, so I can do this: [root @ test/root] # tar-zcvf mysql. 'date ready y-1_m-1_d'.tar.gz/var/lib/mysql [root @ test/root] # tar-N '2017/05 '-zcvf home.tar.gz/home only contains files newer than 2002/07, files under/home will be packaged into home.tar.gz