• 周日. 11月 27th, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

[Linux] classic interview questions system management backup strategy

[db:作者]

1月 6, 2022

[Linux] Classic interview questions – System management – Backup policy

Catalog
  • [Linux] Classic interview questions – System management – Backup policy
    • One 、 Backup directory
      • 1.1 System catalog
      • 1.2 Service catalog
    • Two 、 Backup policy
      • 2.1 Full backup
      • 2.2 Incremental backup
      • 2.3 Differential backup
    • 3、 … and 、 Backup frequency
      • 3.1 Real time backup
      • 3.2 Scheduled backup
    • Four 、 Backup location
      • 4.1 Local backup
      • 4.2 Remote backup
    • 5、 … and 、 Reference plan
      • 5.1 database server

One 、 Backup directory

1.1 System catalog

Catalog Content
/etc/sysconfig/network-scripts/ Network profile
/etc/resolv.conf DNS Parsing files
/etc/hosts hosts The mapping file
/etc/fstab Boot mount record
/etc/inittab Set power on runlevel
/etc/profile Set global variables
/etc/group User group profile
/etc/passwd User account information
/etc/shadow User password information
/etc/sudoers sudo The configuration file
/etc/rsyslof.conf Log settings file
/usr/local Put the source code package to compile the installed software
/var/log/messages System default log file
/var/log/secure Verify authorization aspect log
/var/log/boot.log System startup log
/var/log/cron cron Process log
/var/log/httpd(apache2) apache journal
/var/log/mail mail journal
/var/log/samba samba journal
/var/log/sssd Daemons security log

1.2 Service catalog

With MySQL、Apache For example :

Catalog Content
/var/lib/mysql RPM Packages installed MySQL
/usr/local/mysql/data/ Source code package compiled MySQL
/var/www/html/ Apache Website content
/usr/local/apache2/htdocs/
/etc/httpd/conf/httpd.conf Apache The configuration file
/usr/local/conf/httpd.conf
/var/log/httpd/ Apache Log files
/usr/local/apache2/logs/

Two 、 Backup policy

 View the source image

2.1 Full backup

Full backup (Full Backup): Back up a copy of the same data .

Common commands :cp、tar、dump(ext4)、xfsdump(xfs)

2.2 Incremental backup

Differential backup (Differential Backup): The previous backup is for reference .

Common commands :cp、tar、dump(ext4)、xfsdump(xfs)

2.3 Differential backup

Differential backup (Incremental Backup ): Backup with the first backup as a reference .

Common commands :cp、tar、dump(ext4)、xfsdump(xfs)

3、 … and 、 Backup frequency

3.1 Real time backup

  • Such as MySQL Master slave synchronization , Distributed storage OSD Active and standby write of .

3.2 Scheduled backup

  • Like every day 、 Weekly backup , Usually by “ Script + Timing task ” Realization .

Four 、 Backup location

4.1 Local backup

  • Local : Backup on different servers , On different hard disks .

4.2 Remote backup

  • Off site : Backup in different data centers , Different computer rooms .

5、 … and 、 Reference plan

5.1 database server

Take a database for example :

  • Daily backup data ( Remote backup )

    • MySQL database ( Master slave backup , Do incremental backup once a day )
  • Data backed up every week ( Remote backup )

    • MySQL database ( Do a full backup once a week )

    • Important system data ( The configuration file 、 Log class )

    • Web data (Apache)

    • Other service related data .

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注