文章目录
备份系统
如何备份linux系统呢?很简单,就像你备份或压缩其它东西一样,使用TAR。和Windows不同,Linux不会限制root访问任何东西,你可以把分区上的所有东西都扔到一个TAR文件里去!
搜集信息
版本信息
[root@localhost home]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
[root@localhost home]# uname -a
Linux localhost.localdomain 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
查看位数
getconf LONG_BIT
查uuid
[root@localhost home]# blkid
/dev/sda1: UUID="878753cc-4796-445b-8803-5474dd11224e" TYPE="xfs"
/dev/sda2: UUID="GrKX0b-mcu5-YCbB-OceF-ljWQ-9BgO-efY51Y" TYPE="LVM2_member"
/dev/mapper/centos-root: UUID="e59ac327-9c57-49b2-a663-0c1194e366b0" TYPE="xfs"
/dev/mapper/centos-swap: UUID="ac14ffb9-4501-476d-9e43-ed4a00616655" TYPE="swap"
/dev/mapper/centos-home: UUID="c3091524-0e48-4bf4-a2c1-01d011d75733" TYPE="xfs"
磁盘信息
[root@localhost home]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00009674
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 1953523711 975712256 8e Linux LVM
Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-swap: 8388 MB, 8388608000 bytes, 16384000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-home: 937.0 GB, 937045262336 bytes, 1830166528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
[root@localhost home]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 930