Linux backup and LVM Logical Volume

Backup and LVM Logical Volume

Disk usage:
1. Partition:
# the fdisk / dev / sdb2
/ dev / hda3
2. Format:
#mkfs -t (or .ext4) / dev / sdb3
#mkfs XFS -t / dev / hda3

    3.挂载:
         #mount     /dev/sdb3      空目录
         #umount      挂载点    //卸载
       #vim    /etc/fatab
       #mount   -a   //手动的执行自动挂载

        #mount  -o  loop  Centos.iso    挂载点

-LVM logical disk using a disk array -ceph storage -RAID

Memory swap space: the swap
1. The maximum memory address space: 64G
2. The size of the swap space is typically 2 times the memory

1. Partition:
2. Format:
# mkswap / dev / hdc6
3. Load:
# swapon / dev / hdc6
turned off:
#swapof: F / dev / hdc6
4. Check internal space:
#Free

       1bytes=8bit     00000001
     1  --  00000001
          100个1

Compression and archiving, backup
100G - 100G
101G - 101G
98G - 98G

AAAA - AAAA
AAAAAA - AAAAAA
AABB - AABB
AAB - AAB
full backup differential backup incremental backup

1. Full backup: dump {-Suvj} {-Level} -f { file} backup data to be backed
options:
, -S lists how much disk space to back up data needs to be backed up is completed
-u will record the backup time dymp to / etc / dumpdates file
-v display dump file process
-j bzip2 compression support, the default compression level 2
-Level -9 -0
-f file with
-W listed in / etc / fatab dump inside the partition has been set whether Remarks

dump example:
1. Locate the file that the minimum system
# df--h
2. to test how much capacity is needed if a full backup?
-S dump # / dev / vdal
3. full backup file record called /root/boot.dump, while updating the record file
#dump -u0 -f /root/boot.dump / root / boot

      2G  swap  -- > 4G
  1.需要一个2G大小的分区                  磁盘的使用方法
      #lsblk

  2.格式化 -->加载
 3.挂载

Restore: restore:

restore -f backup file

                    - C列出备份文件和实际文件差异

Backup Tools: dd

dd if = / dev / sdb1 of 1 to / dev content = /tmp/sdb1.bak bs = 512 count = / sdb1 partition sector of a backup

dd if=/dev/sdb2 of= /tmp/sdb2.ba

################################################## ################################
disk quotas: quota

           1.大小
           2.inode block  数量
                 文件的数量
           3.限值
               hard:500M
               soft:400M-500M  -- qrace  time   宽限时间

Example:
1. Purpose and account: a group of five people, five people account are, myquota1, myquota2, myquota3.myquota4.myquota5, the password is 1234, user groups myquotagrp
2. Disk Restrictions: Each user has a 300M the amount of disk (Hard), the number of files is not limited, so long as usage is more than 250M, to give a warning (Soft)
3. limitation of user groups: group using up the capacity of 1G
4. grace time: 14 days

1. The file system supports
file systems must be established
#df -h / home

     配置为只针对本次开机有效

#mount -o remount ,usrquota,grpquota /

2. start the quota:
# edquota -u username
modify Block / inode / Hard / Soft /
# edquota -t // modify the grace period

Published 20 original articles · won praise 18 · views 68

Guess you like

Origin blog.csdn.net/weixin_46575696/article/details/104900905