Common Linux system backup program

mind Mapping
This is a common backup plan, but what the service will depend on the specific server, and see what the business is run. If you like the game server, the financial sector, it is necessary to back up the database more frequently and more than to ensure the integrity of the security of the database data.

The following is a backup program design process needs to take into account the point.

1, the content need to back up

2, backup tactics

  • Full backup
    achieve command: cp, tar, dump, xfsdump

  • Incremental backup: a backup before each backup as a reference
    to achieve command: CentOS 6.x: dump tool
    to achieve command: CentOS 7.x: xfsdump tool

  • Differential backup: each backup to backup the first time as a reference
    to achieve command: CentOS 6.x: dump tool
    to achieve command: CentOS 7.x: xfsdump tool

3, backup frequency

  • Real-time backup: If the MySQL master-slave synchronization
  • Scheduled Backup: such as daily, weekly backups, general "script + scheduled task" to achieve by

4, the backup storage location

The basic principle: Do not put all your eggs in one basket

  • Local Backup: Backup to a local machine different
  • Offsite Backup: the backup to the remote machine

5, log backup

Since the log file is a text format presentation, but once the text is too large, performance is very poor, so it is necessary to cut the log. Log BUG generally look for when a system error, but before too long the log apparently did not make much sense to BUG appears, so the backup log Rotation need to retain log some time ago is enough.

  • System log management tools: logrotate
    log cutting
    log Rotation
  • Apache service configuration file that comes with log cutting function, but requires alternation by script

Reference:
https://www.bilibili.com/video/BV1NJ411Q7DM?p=6

Guess you like

Origin www.cnblogs.com/ningzijie/p/12668925.html