Dual-Machine backup policy for Linux servers

Source: Internet
Author: User

Machines: Server A and backup server B
Operating System: RedHat
Backup policy: rsync + crontab, regular synchronization. The advantage is Incremental backup, which includes information such as file permissions and dates to facilitate fast recovery and switching between machines.

Server:
/Etc/rsyncd. conf
Uid = root
Gid = root
Use chroot = No
Max connections = 4
PID file =/var/run/rsyncd. PID
Lock file =/var/run/rsync. Lock
Log File =/var/log/rsyncd. Log

[Share]
Path =/home/filetobackup/
Ignore errors
Read Only = Yes
List = Yes
Auth users = Username
Secrets file =/etc/password. Pas

/Etc/password. PAS (permission 400)
Username: Password

Server B:
Backup. Sh
#! /Bin/bash
Date = 'date + % W'
/Usr/bin/rsync-vzrtopg -- Progress -- delete -- password-file =/root/script/password. PAS username @ servera_ip: Share/home/backuppath>/root/logs/rsync. $ date

/Root/script/password. PAS (permission: 400)
Password

Serverb executes script timed synchronization from Monday to Friday
Crontab:
0 1 ** 2-6/root/script/backup. Sh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.