xfs file backup and recovery chapter vm in a new linux disk


XFS provides tools to help xfsdump and xfsrestore backup data XFS file system. xfsdump by inode order to back up an XFS file system.
centos7 choose xfs format as the default file system, and no longer use the previous ext, still supports ext4, xfs designed to generate large data, each single file system can support up 8eb, a single file can support 16tb, not only large amount of data, and high scalability. Can also xfsdump, xfsrestore to back up and restore.
With traditional UNIX file systems differ, XFS not need to be uninstalled before backup; the use of the XFS file system backup can be done to ensure the consistency of the mirror. XFS backup and recovery process is interrupted and can be continued without freezing file system. xfsdump even provides a high-performance multi-threaded backup operation - it's time to dump split into multiple data streams, each data stream can be sent to different destinations xfsdump first look at the following two levels of backup, by default is 0 (i.e., full backup)
0-level representation: a full backup
1-9 level representatives: incremental backup

Full backup: every time specified backup directory complete copy again, regardless of the files in the directory has not changed;
incremental backup: Each time before the (first, second, until the time) did after backup change file backup;
differential backup: every time the first time since the full backup changed files are backed up.

First, the experimental environment

The system CENTOS7.2 add a virtual hard disk (to prepare a test partition) using a normal disk as follows:
add disk size: 20G> Partition> Format> Mount (vm operate, the need to close the client)
to the newly added format your hard drive:

[root @ zl ~] # ls / dev / sd * // view the current status of the hard disk
/ dev / sda / dev / sda1 / dev / sda2 / dev / sda3 / dev / sdb

[root @ zl ~] # fdisk / dev / sdb // sdb in on the hard disk as a file backup
Welcome fdisk (util-linux 2.23.2).

Change will stay in memory until you decide to write the changes to disk.
Please think twice before using the write command.

Device does not contain a recognized partition table
using the disk identifier 0xa2eef719 create a new DOS disk label.

Command (input m to get help): p // view the current status

Disk /dev/sdb:21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
sector size (logical / physical): 512 byte / 512 byte
I / O size (minimum / best): 512 byte / 512 byte
disk label type: DOS
disk identifier: 0xa2eef719

设备 Boot Start End Blocks Id System

Command (input m to get help): new new
the Partition type:
P Primary (Primary 0, 0 Extended, Free. 4)
E Extended
the Select (default P): default value // Enter
the Using Response P default
partition number (1-4, default 1): // default value enter
the start sector (2048-41943039, the default is 2048): // default value enter
the default value 2048
Last sector, sector + or + size {K, M, G } (2048-41943039, the default is 41943039): + 1G // 1G
Zone 1 has been set for Linux type, size to 1 GiB

Command (input m to get help): p

Disk /dev/sdb:21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
sector size (logical / physical): 512 byte / 512 byte
I / O size (minimum / best): 512 byte / 512 byte
disk label type: DOS
disk identifier: 0xa2eef719

设备 Boot Start End Blocks Id System
/dev/sdb1 2048 2099199 1048576 83 Linux

Command (input m to get help): w // Save Configuration
The partition table has been altered!

Calling ioctl () to re-read partition table.
Syncing disks.
[root @ zl ~] # ls / dev / sd * // sdb1 here as a backup to disk
/ dev / sda / dev / sda1 / dev / sda2 / dev / sda3 / dev / sdb / dev / sdb1

[root @ zl ~] # mkfs.xfs / dev / sdb1 // Format sdb1
Meta-Data = / dev / sdb1 an array of lSize = 512 = agcount. 4, agsize BLKS = 65536
= sectsz attr = 512 = 2, = projid32bit. 1
= CRC =. 1 finobt = 0, sparse = 0
Data = BSIZE = 4096 Blocks = 262144, imaxpct = 25
= SUnit = 0 SWidth = 0 BLKS
Naming = Version 2 BSIZE = 4096 ASCII-CI = 0 FTYPE =. 1
log = Internal log BSIZE Blocks 4096 = 2560 =, Version 2 =
= = 512 SUnit sectsz BLKS = 0, the lazy-COUNT. 1 =
Realtime extsz = none 0 = = Blocks 4096, rtextents = 0
[the root ZL @ ~] # mkdir / sdb1 // Create linked overload point
[root @ zl ~] # mount / dev / sdb1 / / sdb1 // will mount sdb1 sdb1 disk mounted in the catalog

[root @ ZL sdb1] # Tree
.
├── test1
│ ├── a.txt
│ └── b.txt
└── test2 // Create a test file

 

 

Come on Come on Come on King Wood

Guess you like

Origin www.cnblogs.com/yazl/p/10969414.html