백업 및 복원

Red Hat Advanced Cluster Security for Kubernetes 3.72

Kubernetes용 Red Hat Advanced Cluster Security 백업 및 복원

Red Hat OpenShift Documentation Team

초록

시스템을 백업하고 백업에서 복원하는 방법에 대해 설명합니다.

1장. Red Hat Advanced Cluster Security for Kubernetes 백업

Red Hat Advanced Cluster Security for Kubernetes의 데이터 백업을 수행할 수 있습니다. 인프라 재해 또는 데이터가 손상된 경우 데이터 복원에 이러한 백업을 사용할 수 있습니다.

Amazon S3 또는 Google Cloud Storage와 통합하여 자동 또는 온 디맨드 백업을 구성할 수 있습니다. 또는 roxctl CLI(명령줄 인터페이스)를 사용하여 온 디맨드 백업을 수행할 수 있습니다.

백업에는 모든 구성, 리소스, 이벤트 및 인증서를 포함하는 Kubernetes 데이터베이스용 전체 Red Hat Advanced Cluster Security가 포함됩니다. 백업이 안전하게 저장되었는지 확인합니다.

중요

Kubernetes 3.0.53 이상용 Red Hat Advanced Cluster Security를 사용하는 경우 백업에 인증서가 포함되지 않습니다.

1.1. Roxctl CLI를 사용하여 요청 시 백업

backup 명령을 사용하여 roxctl CLI를 사용하여 백업을 수행할 수 있습니다. 이 명령을 실행하려면 API 토큰 또는 관리자 암호가 필요합니다.

1.1.1. API 토큰을 사용하여 온 디맨드 백업

API 토큰을 사용하여 Kubernetes용 Red Hat Advanced Cluster Security의 전체 데이터베이스를 백업할 수 있습니다.

사전 요구 사항

  • Admin 역할이 있는 API 토큰이 있어야 합니다.
  • roxctl CLI가 설치되어 있어야 합니다.

절차

  1. ROX_API_TOKENROX_CENTRAL_ADDRESS 환경 변수를 설정합니다.

    $ export ROX_API_TOKEN=<api_token>
    $ export ROX_CENTRAL_ADDRESS=<address>:<port_number>
  2. backup 명령을 실행합니다.

    • Red Hat Advanced Cluster Security for Kubernetes 3.0.55 이상의 경우:

      $ roxctl -e "$ROX_CENTRAL_ADDRESS" central backup
    • Red Hat Advanced Cluster Security for Kubernetes 3.0.54 이상의 경우:

      $ roxctl -e "$ROX_CENTRAL_ADDRESS" central db backup

기본적으로 roxctl CLI는 명령을 실행하는 디렉터리에 백업 파일을 저장합니다. --output 옵션을 사용하여 백업 파일 위치를 지정할 수 있습니다.

추가 리소스

1.1.2. 관리자 암호를 사용하여 온 디맨드 백업

관리자 암호를 사용하여 Kubernetes용 Red Hat Advanced Cluster Security의 전체 데이터베이스를 백업할 수 있습니다.

사전 요구 사항

  • 관리자 암호가 있어야 합니다.
  • roxctl CLI가 설치되어 있어야 합니다.

절차

  1. ROX_CENTRAL_ADDRESS 환경 변수를 설정합니다.

    $ export ROX_CENTRAL_ADDRESS=<address>:<port_number>
  2. backup 명령을 실행합니다.

    • Red Hat Advanced Cluster Security for Kubernetes 3.0.55 이상의 경우:

      $ roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central backup
    • Red Hat Advanced Cluster Security for Kubernetes 3.0.54 이상의 경우:

      $ roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central db backup

기본적으로 roxctl CLI는 명령을 실행하는 디렉터리에 백업 파일을 저장합니다. --output 옵션을 사용하여 백업 파일 위치를 지정할 수 있습니다.

2장. 백업에서 복원

roxctl CLI(명령줄 인터페이스)를 사용하여 기존 백업에서 Red Hat Advanced Cluster Security for Kubernetes를 복원할 수 있습니다.

restore 명령을 사용하여 roxctl CLI를 사용하여 Kubernetes용 Red Hat Advanced Cluster Security를 복원할 수 있습니다. 이 명령을 실행하려면 API 토큰 또는 관리자 암호가 필요합니다.

2.1. API 토큰을 사용하여 복원

API 토큰을 사용하여 Kubernetes용 Red Hat Advanced Cluster Security의 전체 데이터베이스를 복원할 수 있습니다.

사전 요구 사항

  • Red Hat Advanced Cluster Security for Kubernetes 백업 파일이 있어야 합니다.
  • 관리자 역할이 있는 API 토큰이 있어야 합니다.
  • roxctl CLI가 설치되어 있어야 합니다.

절차

  1. ROX_API_TOKENROX_CENTRAL_ADDRESS 환경 변수를 설정합니다.

    $ export ROX_API_TOKEN=<api_token>
    $ export ROX_CENTRAL_ADDRESS=<address>:<port_number>
  2. 복원 명령을 실행합니다.

    $ roxctl -e "$ROX_CENTRAL_ADDRESS" central db restore <backup_file>

2.2. 관리자 암호를 사용하여 복원

관리자 암호를 사용하여 Kubernetes용 Red Hat Advanced Cluster Security의 전체 데이터베이스를 복원할 수 있습니다.

사전 요구 사항

  • Red Hat Advanced Cluster Security for Kubernetes 백업 파일이 있어야 합니다.
  • 관리자 암호가 있어야 합니다.
  • roxctl CLI가 설치되어 있어야 합니다.

절차

  1. ROX_CENTRAL_ADDRESS 환경 변수를 설정합니다.

    $ export ROX_CENTRAL_ADDRESS=<address>:<port_number>
  2. 복원 명령을 실행합니다.

    $ roxctl -p <admin_password> -e "$ROX_CENTRAL_ADDRESS" central db restore <backup_file>

2.3. 복원 작업 재시작

복원 작업 중에 연결이 중단되거나 오프라인으로 전환해야 하는 경우 복원 작업을 다시 시작할 수 있습니다.

  • resume 작업을 실행하는 시스템에 액세스할 수 없는 경우 roxctl central db restore status 명령을 사용하여 지속적인 복원 작업의 상태를 확인합니다.
  • 연결이 중단되는 경우 연결을 사용할 수 있게 되면 roxctl CLI에서 작업을 자동으로 복원하려고 합니다. 자동 연결 재시도는 시간 제한 옵션에 지정된 기간에 따라 다릅니다.
  • --timeout 옵션을 사용하여 roxctl CLI가 복원 작업 재시작을 중지한 후 시간(초, 분 또는 시간)을 지정합니다. 지정하지 않으면 기본 시간 초과는 10분(분)입니다.
  • 복원 작업이 중단되었거나 취소하려면 roxctl central db restore cancel 명령을 사용하여 지속적인 복원 작업을 취소합니다.
  • 복원 작업이 중단되거나 이를 취소하거나 시간 초과한 경우 원래 명령을 다시 실행하여 이전 복원을 다시 시작할 수 있습니다.
참고
  • 중단되는 동안 Red Hat Advanced Cluster Security for Kubernetes는 24시간 동안 지속적인 복원 작업을 캐시합니다. 원래 복원 명령을 다시 실행하여 이 작업을 다시 시작할 수 있습니다.
  • --timeout 옵션은 클라이언트 측 연결 재시도만 관리하고 24시간 서버 측 복원 캐시에는 영향을 미치지 않습니다.
  • 중앙 Pod를 다시 시작하면 복원 작업을 다시 시작할 수 없습니다.
  • 복원 작업이 중단되면 24시간 이내에 시스템을 재시작하고 중앙을 재시작하기 전에 Kubernetes용 Red Hat Advanced Cluster Security에서 복원 작업을 취소해야 합니다.

법적 공지

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.