強化 Linux リポジトリー・サーバーの構成
このステップでは、強化 Linux® バックアップ・リポジトリーを Veeam® 管理対象サーバーとして Veeam バックアップ・インフラストラクチャーに追加する、Ansible® Playbook について説明します。 Playbook は以下のタスクを実行します。
Playbook は、Visual Studio Code などのエディターを使用してラップトップ上でローカルに作成できます。自動化サーバーの \swlib\ansible
ディレクトリーに転送することも、vi や nano などのテキスト・エディターで自動化サーバー上でローカルに編集することもできます。
Playbook の作成
Playbook create_lhbr.yml
は、以下のコードで開始します。
- hosts: vbr
vars_files:
- vault
vars:
lhbr_user: veeamlhbr
lhbr_password: "{{ vault_lhbr_password }}"
lhbr_vbr_name: <lhbr_vbr_name>
lhbr_fqdn: <lhbr_fqdn>
immutability_period: <immutability_period>
max_concurrent_jobs: <max_concurrent_jobs>
上記のコード・スニペットの <lhbr_vbr_name>
、<lhbr_fqdn>
、および <immutability_period>
を、以前のステップで取得した値に置き換えます。 上記のコードにより、以下のアクションが実行されます。
- インベントリー・ファイル内で
vbr
として定義されているホスト上で Playbook を実行することを定義します。 - 他の変数を含む、
vault
という名前のファイルを定義します。 前のステップで作成されたvault
ファイルは暗号化されており、パスワードなどの機密変数が含まれています。 - 強化 Linux リポジトリー
<lhbr_vbr_name>
、およびサーバーの FQDN の指定に使用される短縮名を定義します。
Windows ファイアウォール・ルールの作成
以下のコード・スニペットは、Veeam バックアップ・サーバーへのインバウンド・トラフィックを許可する Windows® ファイアウォール・ルールを追加します。
tasks:
- name: Veeam firewall rule TCP 111 in
community.windows.win_firewall_rule:
name: Veeam port mapper service (TCP-in)
group: Veeam
localport: 111
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
- name: Veeam firewall rule UDP 111 in
community.windows.win_firewall_rule:
name: Veeam port mapper service (UDP-in)
group: Veeam
localport: 111
action: allow
direction: in
protocol: udp
state: present
enabled: yes
- name: Veeam firewall rule TCP 1058 in
community.windows.win_firewall_rule:
name: Veeam Mount acceptor port of vPower NFS service (TCP-in)
group: Veeam
localport: 1058
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
- name: Veeam firewall rule TCP 2049 in
community.windows.win_firewall_rule:
name: Veeam NFS acceptor port of vPower NFS service (TCP-in)
group: Veeam
localport: 2049
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
- name: Veeam firewall rule TCP 2500-3300 in
community.windows.win_firewall_rule:
name: Veeam data transmission channels (TCP-in)
group: Veeam
localport: 2500-3300
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
このコード・スニペットでは、Veeam ポート・マッパー・サービス、マウント・アクセプター・ポート、および NFS アクセプター・ポートが、vPower NFS サービスによって使用され、バックアップ・ファイルが VMware ESXi™ ホストに提示されます。 Veeam データ転送チャネルは、Veeam 強化バックアップ・リポジトリーを含む Veeam コンポーネント間で使用されます。
強化 Linux バックアップ・リポジトリーの追加
以下のコード・スニペットは、強化 Linux リポジトリーを Veeam 管理対象サーバーとして追加して、その後、その管理対象サーバーをバックアップ・リポジトリーとして追加します。
- name: Connect to the local VBR server
win_shell: Connect-VBRServer
- name: Add the server as a Veeam Managed Server
win_shell: Add-VBRLinux -Name '{{ lhbr_fqdn }}' -SSHUser '{{ lhbr_user}}' -SSHPassword '{{ lhbr_password }}' -Description "Linux Hardened Repository - {{ lhbr_vbr_name }}" -SSHElevateToRoot:$true -SSHTempCredentials:$true -Confirm:$false
- name: Add the Veeam Managed Server as a Linux Hardened Backup Repository
win_shell: Add-VBRBackupRepository -Folder /mnt/veeamrepo01 -Type LinuxLocal -ImmutabilityPeriod '{{ immutability_period }}' -EnableBackupImmutability:$true -EnableXFSFastClone:$true -AlignDataBlocks:$true -UsePerVMFile:$true -MaxConcurrentJobs '{{ max_concurrent_jobs }}' -Server '{{ lhbr_fqdn }}' -Description "Linux Hardened Repository" -Name '{{ lhbr_vbr_name }}'
-SSHTempCredentials:$true
を使用することで、SSH 資格情報が Veeam の資格情報ストアに入力されないようにします。-EnableXFSFastClone:$true
は、バックアップ・リポジトリーに対して Fast Clone テクノロジーが有効であることを定義します。-AlignDataBlocks:$true
は、バックアップ・データ・ブロックを、リポジトリーに保管する前に圧縮解除する必要があることを示します。-UsePerVMFile:$true
は、バックアップ・リポジトリーが仮想マシン (VM) ごとにバックアップ・ファイルを作成する必要があることを示します。
スケールアウト・バックアップ・リポジトリーの作成
以下のコード・スニペットは、強化 Linux リポジトリーを既存のものとしてスケールアウト・バックアップ・リポジトリーに追加します。 このステップはオプションです。 このコードは、不変バックアップでランサムウェアから守る: Veeamガイドから抜粋したものです。 リポジトリー構成はスタンドアロン・リポジトリーでなければなりません (スケールアウト・バックアップ・リポジトリーが技術的に準拠するのは、キャパシティー層に「コピー」ポリシーが使用されている場合のみです)。
- name: Create a Scale-Out Backup Repository
win_shell: Add-VBRScaleOutBackupRepository -PolicyType DataLocality -Extent '{{ lhbr_vbr_name }}' -Name "Linux Hardened Repository - {{ lhbr_vbr_name }}" -Description "Linux Hardened Repository" -UsePerVMBackupFiles:$true