본 문서는 RHEL에 내장된 재해복구솔루션 ReaR (Relax and Recover)를 이용하여 OS 영역의 데이터를 백업하고 복구하는 방법을 다루고 있습니다. ReaR는 iso를 비롯한 다양한 백업 데이터 포맷을 지원하나, 이 문서에서는 CD/DVD 미디어 반입/보관이 보안상 대부분 허용되지 않는 기업 환경에서도 원활히 사용할 수 있는 PXE boot를 지원하는 포맷으로 ReaR 백업 데이터를 생성하고 복구하는 방법만을 자세히 설명합니다.
레드햇 엔터프라이즈 리눅스 7 기반에 대한 운영자 가이드 기초편을 공유합니다.
부트로더 관리, 패키지, 네트워크, 스토리지 및 크래쉬 덤프 발생에 대한 관리까지 기초 운영 지식에 대한 부분을 본 문서를 통해 얻으실 수 있습니다.
오픈소스컨설팅의 문경윤차장께서 공유해주신 내용입니다.
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
Talk by Brendan Gregg for USENIX LISA 2019: Linux Systems Performance. Abstract: "
Systems performance is an effective discipline for performance analysis and tuning, and can help you find performance wins for your applications and the kernel. However, most of us are not performance or kernel engineers, and have limited time to study this topic. This talk summarizes the topic for everyone, touring six important areas of Linux systems performance: observability tools, methodologies, benchmarking, profiling, tracing, and tuning. Included are recipes for Linux performance analysis and tuning (using vmstat, mpstat, iostat, etc), overviews of complex areas including profiling (perf_events) and tracing (Ftrace, bcc/BPF, and bpftrace/BPF), and much advice about what is and isn't important to learn. This talk is aimed at everyone: developers, operations, sysadmins, etc, and in any environment running Linux, bare metal or the cloud."
Yesterday I gave presentation on Ansible and it was successful . It give basic understanding of playbook and an example implementation of jboss application from scratch
레드햇 엔터프라이즈 리눅스 7 기반에 대한 운영자 가이드 기초편을 공유합니다.
부트로더 관리, 패키지, 네트워크, 스토리지 및 크래쉬 덤프 발생에 대한 관리까지 기초 운영 지식에 대한 부분을 본 문서를 통해 얻으실 수 있습니다.
오픈소스컨설팅의 문경윤차장께서 공유해주신 내용입니다.
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
Talk by Brendan Gregg for USENIX LISA 2019: Linux Systems Performance. Abstract: "
Systems performance is an effective discipline for performance analysis and tuning, and can help you find performance wins for your applications and the kernel. However, most of us are not performance or kernel engineers, and have limited time to study this topic. This talk summarizes the topic for everyone, touring six important areas of Linux systems performance: observability tools, methodologies, benchmarking, profiling, tracing, and tuning. Included are recipes for Linux performance analysis and tuning (using vmstat, mpstat, iostat, etc), overviews of complex areas including profiling (perf_events) and tracing (Ftrace, bcc/BPF, and bpftrace/BPF), and much advice about what is and isn't important to learn. This talk is aimed at everyone: developers, operations, sysadmins, etc, and in any environment running Linux, bare metal or the cloud."
Yesterday I gave presentation on Ansible and it was successful . It give basic understanding of playbook and an example implementation of jboss application from scratch
24시간 365일 서비스를 위한 MySQL DB 이중화.
MySQL 이중화 방안들에 대해 알아보고 운영하면서 겪은 고민들을 이야기해 봅니다.
목차
1. DB 이중화 필요성
2. 이중화 방안
- HW 이중화
- MySQL Replication 이중화
3. 이중화 운영 장애
4. DNS와 VIP
5. MySQL 이중화 솔루션 비교
대상
- MySQL을 서비스하고 있는 인프라 담당자
- MySQL 이중화에 관심 있는 개발자
[Open Infrastructure & Cloud Native Days Korea 2019]
커뮤니티 버전의 OpenStack 과 Ceph를 활용하여 대고객서비스를 구축한 사례를 공유합니다. 유연성을 확보한 기업용 클라우드 서비스 구축 사례와 높은 수준의 보안을 요구하는 거래소 서비스를 구축, 운영한 사례를 소개합니다. 또한 이 프로젝트에 사용된 기술 스택 및 장애 해결사례와 최적화 방안을 소개합니다. 오픈스택은 역시 오픈소스컨설팅입니다.
#openstack #ceph #openinfraday #cloudnative #opensourceconsulting
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
Oracle's MySQL solutions make it easy to setup various database architectures and achieve high availability with the introduction MySQL InnoDB Cluster and MySQL InnoDB ReplicaSet meeting various high availability requirements. MySQL InnoDB ClusterSet provides a popular disaster recovery solution.
Completely built in-house and supported by Oracle, many enterprises large and small have adopted these solutions into business critical applications.
In this presentation the various database architecture solutions for high availability and disaster recovery will be covered and help you choose the right solutions based on your business requirements.
This presentation is an introduction to Ansible, an IT automation tool which can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Differences between MariaDB 10.3 & MySQL 8.0Colin Charles
MySQL and MariaDB are becoming more divergent. Learn what is different from a high level. It is also a good idea to ensure that you use the correct database for the correct job.
Monitoramento de Aplicações Web Modernas com ZabbixAndré Déo
Demonstrar que com os recursos nativos da ferramenta, atrelados à desenvolvedores integrados com a equipe de operações (DevOps) é possível monitorar aplicações web modernas, que utilizam recursos como APIs, REST e JSON.
24시간 365일 서비스를 위한 MySQL DB 이중화.
MySQL 이중화 방안들에 대해 알아보고 운영하면서 겪은 고민들을 이야기해 봅니다.
목차
1. DB 이중화 필요성
2. 이중화 방안
- HW 이중화
- MySQL Replication 이중화
3. 이중화 운영 장애
4. DNS와 VIP
5. MySQL 이중화 솔루션 비교
대상
- MySQL을 서비스하고 있는 인프라 담당자
- MySQL 이중화에 관심 있는 개발자
[Open Infrastructure & Cloud Native Days Korea 2019]
커뮤니티 버전의 OpenStack 과 Ceph를 활용하여 대고객서비스를 구축한 사례를 공유합니다. 유연성을 확보한 기업용 클라우드 서비스 구축 사례와 높은 수준의 보안을 요구하는 거래소 서비스를 구축, 운영한 사례를 소개합니다. 또한 이 프로젝트에 사용된 기술 스택 및 장애 해결사례와 최적화 방안을 소개합니다. 오픈스택은 역시 오픈소스컨설팅입니다.
#openstack #ceph #openinfraday #cloudnative #opensourceconsulting
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
Oracle's MySQL solutions make it easy to setup various database architectures and achieve high availability with the introduction MySQL InnoDB Cluster and MySQL InnoDB ReplicaSet meeting various high availability requirements. MySQL InnoDB ClusterSet provides a popular disaster recovery solution.
Completely built in-house and supported by Oracle, many enterprises large and small have adopted these solutions into business critical applications.
In this presentation the various database architecture solutions for high availability and disaster recovery will be covered and help you choose the right solutions based on your business requirements.
This presentation is an introduction to Ansible, an IT automation tool which can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Differences between MariaDB 10.3 & MySQL 8.0Colin Charles
MySQL and MariaDB are becoming more divergent. Learn what is different from a high level. It is also a good idea to ensure that you use the correct database for the correct job.
Monitoramento de Aplicações Web Modernas com ZabbixAndré Déo
Demonstrar que com os recursos nativos da ferramenta, atrelados à desenvolvedores integrados com a equipe de operações (DevOps) é possível monitorar aplicações web modernas, que utilizam recursos como APIs, REST e JSON.
기존에 저희 회사에서 사용하던 모니터링은 Zabbix 였습니다.
컨테이너 모니터링 부분으로 옮겨가면서 변화가 필요하였고, 이에 대해서 프로메테우스를 활용한 모니터링 방법을 자연스럽게 고민하게 되었습니다.
이에 이영주님께서 테크세션을 진행하였고, 이에 발표자료를 올립니다.
5개의 부분으로 구성되어 있으며, 세팅 방법에 대한 내용까지 포함합니다.
01. Prometheus?
02. Usage
03. Alertmanager
04. Cluster
05. Performance
2018년도 Amazon AWS re:Invent Machine Learning 부분에 대한 요약을 오픈소스컨설팅 서경빈(AWS SA)님이 해주셨습니다.
사내 발표 때 아주 쉽게 설명해주셔서 좋았는데, 해당 내용은 Tech Blog에서도 확인이 가능합니다.
https://tech.osci.kr/2018/12/06/50693623/
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
Docker를 활용하여 Gitlab CI/CD 설치 구성 및 샘플 테스트를 위한 가이드 문서이며, Docker 및 Gitlab에 대한 개요 및 사용법에 대해서는 다루지 않습니다. Docker image를 이용 Gitlab 및 Gitlab CI/CD 설치 및 구성 후 Sample Spring boot web application을 이용하여 소스 변경에 따른 commit이 발생 했을 때 Gitlab CI/CD 기능을 통해 application 테스트, 빌드, 배포까지의 일련의 과정이 자동으로 진행되는지를 테스트 하는 내용입니다.
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항Ji-Woong Choi
Cloud 기반으로 U2C(Unix to Cloud),U2L(Unix to Linux) 마이그레이션에 대한 가이드 라인과 사이징 관련 고려 사항에 대해 설명한 자료입니다.
많은 전환 프로젝트에서 추출된 경험치가 들어가 있으며, 전환별 난이도 및 고려사항이 들어가 있습니다.
장소 : 미국 보스턴 Hynes Convention Center
일시 : 2017년 5월 6일 ~ 11일 (미국 동부 시각)
참가 인원 : 5000명 이상
참가 업체 : 1014개
참가국 : 63개국
세션 수 : 750여 개(이전 Summit 대비 약 250여 개 증가)
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
OpenStack Ceph & Neutron에 대한 설명을 담고 있습니다.
1. OpenStack
2. How to create instance
3. Ceph
- Ceph
- OpenStack with Ceph
4. Neutron
- Neutron
- How neutron works
5. OpenStack HA- controller- l3 agent
6. OpenStack multi-region
아틀라시안 JIRA를 사용할 때 가장 핵심적으로 해야 할 내용들만 추려서 가이드 문서를 작성하였습니다.
그러한 작업들로는 프로젝트, 스킴(Scheme), 이메일 세팅, 권한 관리, 백업/복구 등이 있습니다.
관리자가 이런 일을 잘 할 수 있도록 핵심적인 내용만으로 구성한 문서를 공유합니다.
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning Ji-Woong Choi
TTA에 KVM 기반 프로비저닝 기술에 대한 데모 세션을 포함하는 세미나 관련 자료입니다. 클라우드환경으로 가고자 해서 Paas를 어떤 플랫폼위에 올린다면 그리고 가상화 환경이나 클라우드 환경으로 올린다면 어떤 환경으로 올릴것인가를 고민하여야 합니다.
그리고 이 hypervisor중에 cloud 환경에서 가장 주목받는 kvm을 기반으로 하는 두가지 가상화 클라우드 솔루션인 rhev와 openstack을 잠시 살펴볼 것입니다.
그리고 이러한 가상화 클라우드 환경에서 자동화 하는 솔류션을 어떻게 고려해야 하는가를 살펴보고, 그런 솔류션중에 하나인 아테나 피콕에 대해 살펴보겠습니다.
그리고 오픈스택환경하에서 구축해서 사용했던 사용기와 이를 자동화하기위해 개발자들이 사용했던 간단한 ansible provisioning 모습을 시연합니다.
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
1. Confidential
(오픈소스컨설팅) Red Hat ReaR (Relax-and-Recover) Quick Guide_v1.0.pdf
Last printed on 4/19/2017 6:31:00 PM
Red Hat ReaR (Relax-and-Recover)
Quick Guide
Project Name:
Department:
Focus Area:
Product/Process: Red Hat Enterprise Linux Server 5, 6 ,7
Prepared By:
Document Owner(s) Project/Organization Role
문경윤 차장
Project Status Report Version Control
Version Date Author Change Description
1.0 2017/04/19 문경윤 차장 Document updated
2. Configuration Report
Confidential Page 2 4/19/2017
TABLE OF CONTENTS
1 본 문서의 목적 ............................................................................................................................ 3
1.1 작업 일시......................................................................................................................... 3
1.2 작업의 범위 ..................................................................................................................... 3
2 REAR 를 사용하기 위한 환경 구성 ................................................................................................ 4
2.1 구성도............................................................................................................................. 4
2.2 컴포넌트에 대한 이해 ....................................................................................................... 4
2.3 PXE Boot 서버 설치 및 구성 ............................................................................................. 6
2.4 NFS Server 설치 및 구성 .................................................................................................. 8
2.5 ReaR 설치 및 구성 ......................................................................................................... 10
3 REAR 로 시스템 백업하기 .......................................................................................................... 12
3.1 백업 실행....................................................................................................................... 12
3.2 백업 데이터 설명............................................................................................................ 13
4 REAR 로 시스템 복구하기 .......................................................................................................... 15
4.1 ReaR rescue boot image 를 PXE Boot Server 에 전송 ...................................................... 15
4.2 복구 대상 시스템을 PXE boot 및 ReaR 복구..................................................................... 16
5 RED HAT REAR(RELAX-AND-RECOVER) 설치 보고서 승인 ........................................................ 21
6 APPENDICES ........................................................................................................................... 21
6.1 Document Guidelines..................................................................................................... 21
6.2 Project Migration Report Sections Omitted...................................................................... 21
3. Configuration Report
Confidential Page 3 4/19/2017
1 본 문서의 목적
본 문서는 RHEL 에 내장된 재해복구솔루션 ReaR (Relax and Recover)를 이용하여 OS 영역의 데이터를
백업하고 복구하는 방법을 다루고 있습니다. ReaR 는 iso 를 비롯한 다양한 백업 데이터 포맷을 지원하나, 이
문서에서는 CD/DVD 미디어 반입/보관이 보안상 대부분 허용되지 않는 기업 환경에서도 원활히 사용할 수
있는 PXE boot 를 지원하는 포맷으로 ReaR 백업 데이터를 생성하고 복구하는 방법만을 자세히 설명합니다.
1.1 작업 일시
구분 내용
시간 2017 년 4 월
장소 N/A
작업자 오픈소스컨설팅 문경윤 차장(moon@osci.kr) – Infra Engineer
담당 매니저 N/A
1.2 작업의 범위
이 문서는 아래와 같은 내용을 포함하고 있습니다.
ReaR 를 사용하기 위한 환경 구성
Red Hat Enterprise Linux Server 5, 6, 7 에서 ReaR 를 이용한 백업 및 복구
4. Configuration Report
Confidential Page 4 4/19/2017
2 ReaR 를 사용하기 위한 환경 구성
2.1 구성도
2.2 컴포넌트에 대한 이해
컴포넌트 용도
PXE boot Server ReaR 를 이용한 복구 작업 때에만 필요한 시스템.
ReaR 로 백업되어 나온 백업 데이터 중 일부인 PXE
boot 용 이미지파일을 PXE boot Server 에 저장하여
사용하게 된다. PXE boot 를 제공해야 하는
시스템이므로 bootp 파일(pxelinux.0), dhcpd, tftp-
server 가 구성되어야 한다.
PXE boot client 평소 ReaR 로 백업을 하며, 장애 시 복구 대상이
되는 시스템. PXE boot Server 로부터 ReaR Rescue
boot image 를 제공받게 되는 시스템으로 PXE boot
server 와는 동일 L2 네트워크에 위치해 있어야 한다.
5. Configuration Report
Confidential Page 5 4/19/2017
NAS (또는 NFS Server) ReaR 에 의해 백업된 데이터가 평소 저장되는
스토리지. 백업이 실행되면 NAS 가 일시적으로 자동
마운트되어 백업되고, 백업이 끝나면 언마운트된다.
ReaR 로 백업이 끝나면 NAS 에서는 아래 백업
데이터들이 확인된다.
1. Rear rescue boot image
OS 부팅에 필요한 MBR, boot loader, 커널 이미지
파일 등을 담고 있는 파일. 복구 작업 때에 PXE
Server 에 위치시켜야 하는 데이터이다.
2. backup.tar.gz - /root, /etc, /usr, /var 등의 리눅스
시스템 영역의 데이터들을 백업한 압축 파일. 복구
작업 때에 backup.tar.gz 는 PXE boot server 에
위치시킬 필요 없다.
6. Configuration Report
Confidential Page 6 4/19/2017
2.3 PXE Boot 서버 설치 및 구성
PXE boot 서버는 복구 시에만 필요하므로 평소에는 동작시켜 놓을 필요 없다.
Step 1) DHCP 서버 구성
① 패키지 설치 및 설정 파일 구성 (예: dhcp 서버의 ip 는 192.168.93.1)
[root@pxeserver ~]# yum install dhcpd
[root@pxeserver ~]# vi /etc/dhcpd/dhcpd.conf
ddns-update-style none;
ignore client-updates;
allow booting;
allow bootp;
subnet 192.168.93.0 netmask 255.255.255.0 {
option routers 192.168.93.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.93.255;
option domain-name-servers 192.168.93.1;
option domain-name "localdomain";
option time-offset -18000; # Eastern Standard Time
range dynamic-bootp 192.168.93.2 192.168.93.254;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.93.1;
filename "linux-install/pxelinux.0";
}
② DHCP server 용도로 사용할 NIC(예: bond0)에 IP address(예: 192.168.93.1) 할당 및 확인
[root@pxeserver ~]# ip addr add 192.168.93.1/24 dev bond0
[root@pxeserver ~]# ip addr
③ dhcpd 시작
RHEL 5, 6
[root@pxeserver ~]# service dhcpd start
RHEL 7
[root@pxeserver ~]# systemctl start dhcpd
7. Configuration Report
Confidential Page 7 4/19/2017
④ dhcpd 실행 상태 확인
[root@pxeserver ~]# netstat -nulp | grep dhcp
udp 0 0 0.0.0.0:67 0.0.0.0:* 2483/dhcpd
Step 2) TFTP-Server 구성
① 패키지 설치 및 설정 파일 구성
[root@pxeserver ~]# yum install tftp-server
[root@pxeserver ~]# vi /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
[root@pxeserver ~]# yum install syslinux
[root@pxeserver ~]# mkdir -p /var/lib/tftpboot/linux-install/pxelinux.cfg
[root@pxeserver ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/linux-install/
② tftp-server 시작
RHEL 5, 6
[root@pxeserver ~]# service xinetd restart
RHEL 7
[root@pxeserver ~]# systemctl restart xinetd
③ tftp-server 실행 상태 확인
[root@pxeserver ~]# netstat -nulp | grep xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 2443/xinetd
8. Configuration Report
Confidential Page 8 4/19/2017
2.4 NFS Server 설치 및 구성
Step 1) 패키지 설치
RHEL 5
[root@nfsserver ~]# yum install nfs-utils nfs-utils-lib portmap
RHEL 6, 7
[root@nfsserver ~]# yum install nfs-utils nfs-utils-lib rpcbind
Step 2) 방화벽 아래에서도 서비스할 수 있도록 NFS 구성 변경
NFS Server 는 기본값으로 다중 포트로 동작한다. 이 포트들은 기본적으로 rpcbind 에 의해 동적으로
할당된다. 방화벽 환경에서는 이 기본 설정으로 운영할 수 없으므로 포트를 고정시키는 설정이 필요하다.
① /etc/sysconfig/nfs 에서 아래 변수들을 수정
MOUNTD_PORT=port
Controls which TCP and UDP port mountd (rpc.mountd) uses.
STATD_PORT=port
Controls which TCP and UDP port status (rpc.statd) uses.
LOCKD_TCPPORT=port
Controls which TCP port nlockmgr (lockd) uses.
LOCKD_UDPPORT=port
Controls which UDP port nlockmgr (lockd) uses.
※ /etc/sysconfig/nfs 의 위 라인들을 주석 해제해서 적용해도 되며, 서드 파티 프로그램들이 사용하는
포트들과 중복되지 않는 포트들 중 선택 적용해도 된다.
예)
MOUNTD_PORT=892
STATD_PORT=662
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
9. Configuration Report
Confidential Page 9 4/19/2017
② 방화벽 포트 Open
Allow TCP and UDP port 2049 for NFS.
Allow TCP and UDP port 111 (rpcbind/sunrpc).
Allow the TCP and UDP port specified with MOUNTD_PORT="port"
Allow the TCP and UDP port specified with STATD_PORT="port"
Allow the TCP port specified with LOCKD_TCPPORT="port"
Allow the UDP port specified with LOCKD_UDPPORT="port"
Step 3) NFS server 서비스 시작
RHEL 5
[root@nfsserver ~]# for i in portmap nfs nfslock ; do chkconfig $i on ; service $i start ; done
RHEL 6
[root@nfsserver ~]# for i in rpcbind nfs nfslock ; do chkconfig $i on ; service $i start ; done
RHEL 7
[root@nfsserver ~]# for i in rpcbind nfs nfslock ; do systemctl enable $i ; systemctl start $i ; done
Step 4) /etc/exports 구성 및 적용
① 구성
형식)
# vi /etc/exports
<export 할 볼륨의 경로> <NFS client 의 주소나 대역>(rw,no_root_squash)
예)
[root@nfsserver ~]# vi /etc/export
/nfs_export 192.168.0.0/24(rw,no_root_squash)
② 적용 및 확인
[root@nfsserver ~]# exportfs -r
[root@nfsserver ~]# exportfs -v
10. Configuration Report
Confidential Page 10 4/19/2017
2.5 ReaR 설치 및 구성
Step 1) 패키지 설치
RHEL5 용 패키지는 레드햇에서 공식 제공하고 있지 않아 EPEL repo 등에서 받아야 한다.
RHEL6 용 패키지는 iso 엔 포함되어 있지 않고 RHN 에서만 받을 수 있다.
RHEL7 용 패키지는 RHEL 7.2 부터 iso 에 포함되어 있으며 RHN 에서도 받을 수 있다.
2017 년 4 월 기준 최신 패키지로 설치하는 것으로 예를 들어 설명한다. ReaR 패키지는 백업 대상
시스템에만 설치한다.
RHEL 5
# yum localinstall rear-1.19-1.el5.x86_64.rpm syslinux-4.02-7.2.el5.x86_64.rpm
RHEL 6
# yum localinstall rear-1.17.2-4.el6.x86_64.rpm syslinux-4.04-3.el6.x86_64.rpm syslinux-nonlinux-4.04-
3.el6.noarch.rpm
RHEL 7
# yum localinstall rear-1.17.2-1.el7.noarch.rpm syslinux-4.05-12.el7.x86_64.rpm syslinux-extlinux-4.05-
12.el7.x86_64.rpm
Step 2) /etc/rear/local.conf 구성
예) 주소는 ”nfsserver”, nfs export path 로는 /nfs_export/ReaR/ 를 갖는 NFS Server 에 백업하는 설정
# vi /etc/rear/local.conf
OUTPUT=PXE
OUTPUT_URL="nfs://nfsserver/nfs_export/ReaR/"
BACKUP=NETFS
BACKUP_URL="nfs://nfsserver/nfs_export/ReaR/"
AUTOEXCLUDE_MULTIPATH=y
BACKUP_PROG_EXCLUDE=( '/cgroup/*' '/lost+found/*' '/net/*' '/selinux/*' '/media/*' '/service/*'
'/command/*' '/misc/*' '/package/*' '/srv/*' '/dev/*' '/mnt/*' '/proc/*' '/sys/*')
/etc/rear/local.conf 주요 옵션 설명
옵션 설명
OUTPUT ReaR rescue mode 부팅용 initrd 를 load 할 포맷을 지정
PXE : pxelinux
ISO : isolinux
OBDR : Tape Drive
USB : External USB disks
11. Configuration Report
Confidential Page 11 4/19/2017
OUTPUT_URL OUTPUT 옵션으로 정의된 포맷의 백업 데이터를 저장할 URL
File type: BACKUP_URL=file:///directory/
NFS type: BACKUP_URL=nfs://nfs-server/directory/
CIFS type: BACKUP_URL=cifs://samba/directory/
USB type: BACKUP_URL=usb:///dev/sdc1/directory/
Tape type: BACKUP_URL=tape:///dev/nst0
ISO type: BACKUP_URL=iso:///directory/
BACKUP backup.tar.gz 를 스토리지에 전송할 방식 지정
NETFS : NFS or CIFS or local
BAREOS : external backup solution
BACKUP_URL BACKUP 옵션으로 정의된 포맷의 백업 데이터를 저장할 URL
File type: BACKUP_URL=file:///directory/
NFS type: BACKUP_URL=nfs://nfs-server/directory/
CIFS type: BACKUP_URL=cifs://samba/directory/
USB type: BACKUP_URL=usb:///dev/sdc1/directory/
Tape type: BACKUP_URL=tape:///dev/nst0
ISO type: BACKUP_URL=iso:///directory/
AUTOEXCLUDE_MULTIPATH MULTIPATH 장치를 백업 대상에서 제외시킬지 결정 (y or n)
BACKUP_PROG_EXCLUDE 백업 대상에서 제외시킬 디렉토리를 지정. 여러 디렉토리를 지정할 경우
아래 포맷으로 정의.
BACKUP_PROG_EXCLUDE=( '/cgroup/*' '/lost+found/*' '/net/*'
'/selinux/*' '/media/*' '/service/*' '/command/*' '/misc/*' '/package/*'
'/srv/*' '/dev/*' '/mnt/*' '/proc/*' '/sys/*')
RHEL 의 최상위 디렉토리 경로 중 백업이 필요하지 않은 디렉토리가
우선적 대상이며, 별도 백업 어플리케이션으로 관리한다면 RHEL 의
system 영역이 아닌 서드 파티 어플리케이션의 디렉토리들도 이 옵션의
주요 대상이다.
Step 3) cron job 설정
형식)
minute hour day_of_month month day_of_week root /usr/sbin/rear mkbackup
예) 월~금요일 22:00 마다 백업
0 22 * * 1-5 root /usr/sbin/rear mkbackup
12. Configuration Report
Confidential Page 12 4/19/2017
3 ReaR 로 시스템 백업하기
3.1 백업 실행
[root@rhel6_6 ~]# rear -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-rhel6_6.log
Creating disk layout
Creating root filesystem layout
TIP: To login as root via ssh you need to set up /root/.ssh/authorized_keys or SSH_ROOT_PASSWORD
in your configuration file
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Copied kernel+initrd (59M) to /var/lib/rear/output
Created pxelinux config 'rear-rhel6_6' and symlinks for MAC adresses in /var/lib/rear/output
Copying resulting files to nfs location
Encrypting disabled
Creating tar archive '/tmp/rear.EH9nJLaH866k0Ks/outputfs/rhel6_6/backup.tar.gz'
Archived 755 MiB [avg 455 KiB/sec]OK
Archived 755 MiB in 1699 seconds [avg 455 KiB/sec]
[root@rhel6_6 ~]#
백업 후 NFS Server 의 export path 에서 확인되는 백업 데이터의 예
[root@nfsserver rhel6_6]# hostname
nfsserver
[root@nfsserver rhel6_6]# pwd
/nfs_export/ReaR/rhel6_6
[root@nfsserver rhel6_6]# ls -l
total 121048
-rw------- 1 root root 4465564 Nov 27 19:01 backup.log
-rw------- 1 root root 57769984 Dec 14 22:44 backup.tar.gz
-rw------- 1 root root 516 Dec 14 22:38 README
-rw------- 1 root root 24531 Dec 14 22:38 rear.log
-rw------- 1 root root 434 Dec 14 22:38 rear-rhel6_6
-rw------- 1 root root 57534286 Dec 14 22:38 rhel6_6.initrd.cgz
-rwx------ 1 root root 4128944 Dec 14 22:38 rhel6_6.kernel
-rw------- 1 root root 267 Dec 14 22:38 rhel6_6.message
-rw------- 1 root root 267 Dec 14 22:38 VERSION
[root@nfsserver rhel6_6]# cat rear-rhel6_6
default hd
13. Configuration Report
Confidential Page 13 4/19/2017
prompt 1
timeout 300
label hd
localboot -1
say ENTER - boot local hard disk
say --------------------------------------------------------------------------------
display /rhel6_6.message
say ----------------------------------------------------------
say rear = disaster recover this system with Relax and Recover
label rear
kernel /rhel6_6.kernel
append initrd=/rhel6_6.initrd.cgz root=/dev/ram0 vga=normal rw selinux=0
[root@nfsserver rhel6_6]# cat rhel6_6.message
Relax-and-Recover 1.17.2 / Git
Relax-and-Recover comes with ABSOLUTELY NO WARRANTY; for details see
the GNU General Public License at: http://www.gnu.org/licenses/gpl.html
Host rhel6_6 using Backup NETFS and Output PXE
Build date: Wed, 14 Dec 2016 13:31:42 +0900
[root@nfsserver rhel6_6]#
3.2 백업 데이터 설명
파일 설명
backup.log backup.tar.gz 백업 데이터 생성 시의 log
backup.tar.gz 백업 데이터 파일
README 백업 데이터 파일로 복구하는 방법을 간단히 기술한
파일
예)
How to recovery your system:
----------------------------
You have to put the attached files onto your TFTP
server that will be used
for PXE booting.
If the computer that needs to be recovered uses a
14. Configuration Report
Confidential Page 14 4/19/2017
different network card than
when the attached Relax-and-Recover files where
created (e.g. you replaced the
broken computer with a new one), then you also
will have to adapt the files in
pxelinux.cfg to match the new MAC address or
adapt your DHCP server to serve
the same IP address to the new MAC address.
YMMV
rear.log ReaR rescue mode 부팅용 initrd 생성 시의 log
rear-<hostname> tftpboot home dir 의 pxelinux.cfg/default 파일로
사용
<hostname>.initrd.cgz ReaR rescue mode 부팅용 initrd 파일
<hostname>.kernel ReaR rescue mode 부팅용 kernel 파일
<hostname>.message 백업 데이터의 속성(대상 호스트네임, 백업 방식
등)이 기록된 파일
예)
Relax-and-Recover 1.17.2 / Git
Relax-and-Recover comes with ABSOLUTELY NO
WARRANTY; for details see
the GNU General Public License at:
http://www.gnu.org/licenses/gpl.html
Host localhost.localdomain using Backup NETFS
and Output PXE
Build date: Wed, 19 Apr 2017 10:29:40 +0900
VERSION ReaR 버전 정보를 기술한 파일
예)
Relax-and-Recover 1.17.2 / Git
Relax-and-Recover comes with ABSOLUTELY NO
WARRANTY; for details see
the GNU General Public License at:
http://www.gnu.org/licenses/gpl.html
Host localhost.localdomain using Backup NETFS
and Output PXE
Build date: Wed, 19 Apr 2017 10:29:40 +0900
15. Configuration Report
Confidential Page 15 4/19/2017
4 ReaR 로 시스템 복구하기
4.1 ReaR rescue boot image 를 PXE Boot Server 에 전송
① NFS Server 에 접속하여 백업본을 확인한 후 backup.tar.gz 를 제외한 모든 백업본을 PXE Boot
Server 에 전송한다. (예: PXE Server 의 public IP 는 204.11.35.10)
[root@nfsserver rhel6_6]# hostname
nfsserver
[root@nfsserver rhel6_6]# pwd
/nfs_export/ReaR/rhel6_6
[root@nfsserver rhel6_6]# ls -l
total 121048
-rw------- 1 root root 4465564 Nov 27 19:01 backup.log
-rw------- 1 root root 57769984 Dec 14 22:44 backup.tar.gz
-rw------- 1 root root 516 Dec 14 22:38 README
-rw------- 1 root root 24531 Dec 14 22:38 rear.log
-rw------- 1 root root 434 Dec 14 22:38 rear-rhel6_6
-rw------- 1 root root 57534286 Dec 14 22:38 rhel6_6.initrd.cgz
-rwx------ 1 root root 4128944 Dec 14 22:38 rhel6_6.kernel
-rw------- 1 root root 267 Dec 14 22:38 rhel6_6.message
-rw------- 1 root root 0 Nov 27 19:01 selinux.autorelabel
-rw------- 1 root root 267 Dec 14 22:38 VERSION
[root@nfsserver rhel6_6]# rsync -av --progress --exclude backup.tar.gz ./
204.11.35.10: /var/lib/tftpboot/linux-install/
② PXE Boot Server 에서 추가 작업을 수행한다.
[root@pxeserver ~]# cd /var/lib/tftpboot/linux-install/
[root@pxeserver ~]# cat rear-rhel6_6
default hd
prompt 1
timeout 300
label hd
localboot -1
say ENTER - boot local hard disk
say --------------------------------------------------------------------------------
display /rhel6_6.message
say ----------------------------------------------------------
say rear = disaster recover this system with Relax and Recover
label rear
kernel /rhel6_6.kernel
append initrd=/rhel6_6.initrd.cgz root=/dev/ram0 vga=normal rw selinux=0
[root@pxeserver ~]# cp rear-rhel6_6 ./pxelinux.cfg/default
16. Configuration Report
Confidential Page 16 4/19/2017
③ dhcpd, tftp-server 실행 중인지 확인
[root@pxeserver ~]# netstat -nulp | grep dhcp
[root@pxeserver ~]# netstat -nulp | grep xinetd
4.2 복구 대상 시스템을 PXE boot 및 ReaR 복구
복구 대상 시스템의 NIC 의 Boot ROM 을 활성화하고 PXE Boot 한다. DHCP 로 IP 를 할당 받은 직후
TFTP Server 로부터 pxelinux.0 을 전송 받아 네트워크 부팅이 완료되었다.
17. Configuration Report
Confidential Page 17 4/19/2017
프롬프트에 “rear”를 입력하면 ReaR rescue image 로 부팅된다.
ReaR rescue image 로 부팅되었으면 NAS 가 외부 네트워크에 존재할 시 NIC 에 public ip 와 default
gateway 를 할당한다.
# ip addr add <ip address> dev <interface name>
# route add default gw <gateway>
20. Configuration Report
Confidential Page 20 4/19/2017
복구가 다 되었으면 파티셔닝 상태를 확인한다. /mnt/local 이라는 임시 디렉토리에 마운트되어 있는 것을
확인할 수 있다. 재부팅하면 복구된 시스템을 확인할 수 있을 것이다.
21. Configuration Report
Confidential Page 21 4/19/2017
5 Red Hat ReaR(Relax-and-Recover) 설치 보고서 승인
Prepared by __________________________________
Open Source Consulting, Inc.
Approved by __________________________________
Project Manager
6 APPENDICES
6.1 Document Guidelines
https://access.redhat.com/documentation/en-
US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Relax-and-
Recover_ReaR.html
6.2 Project Migration Report Sections Omitted
N/A