Uploaded by hyj8973

VxRail Manager 基于文件的备份-

advertisement
VxRail ™ SolVe Generator
Solution for Validating your engagement
主题
VxRail 操作方法过程
选择
系统是否运行 VMware Cloud Foundation on VxRail?: 否
选择活动:: 执行 VxRail Manager 基于文件的备份
选择已安装的 VxRail 软件版本: v7.0.370/371
生成:
June 2, 2022 3:08 PM GMT
报告问题
如果您在此流程中发现任何错误或对此应用程序有相关意见,请发送电子邮件至 SolVeFeedback@dell.com
版权所有 © 2020 Dell Inc. 或其子公司。保留所有权利。
本出版物中的信息均“按原样”提供。 EMC CORPORATION(以下简称“EMC”)不对本出版物中的信息作出
任何形式的陈述或担保,并特别声明拒绝以下担保:有关适销性、对特定用途的适用性、权利和无侵权的任
何暗示担保,以及法规、法律实施、交易习惯、贸易履行过程或贸易惯例所引发的任何担保。在任何情况下
,EMC 均不会对任何损失承担责任,这些损失包括直接、间接、偶发、连带损失、业务利润损失或特殊的
损失,即使事先已经通知 EMC 可能发生此类损失也是如此。
EMC 确信本出版物中所含信息截止至发布之日前均正确无误。这些信息如有更改,恕不另行通知。使用、
复制及分发本出版物中描述的任何 EMC 软件需要相应的软件许可证。
Dell、EMC、Dell EMC 和其他商标均是 Dell Inc. 或其子公司的商标。其他商标可能是其各自所有者的资产。
发布日期:June, 2022
Dell Technologies Confidential Information
version: 4.6.7.0
Page 1 of 11
目录
初步活动任务......................................................................................................................3
阅读、理解并执行以下任务...........................................................................................................................3
VxRail Manager File-Based Backup .......................................................................................4
Requirements:...............................................................................................................................................4
This procedure applies to:.............................................................................................................................4
Audience: ......................................................................................................................................................4
Setup:............................................................................................................................................................4
Prerequisites for restore:...............................................................................................................................4
Backup VxRail Manager manually ................................................................................................................5
Configure automatic backup for VxRail Manager .........................................................................................6
Description...............................................................................................................................................6
Procedure: Automatic backup..................................................................................................................6
FAQ:..............................................................................................................................................................9
Dell Technologies Confidential Information
version: 4.6.7.0
Page 2 of 11
初步活动任务
此部分可能包含您在执行此流程之前必须完成的任务。
阅读、理解并执行以下任务
1.
Table 1表 1列出了在进行此活动之前您需要注意的任务、注意事项、警告、备注和/或知识库 (KB) 解
决方案。
阅读、了解并在必要时执行此表中包含的所有任务以及相关知识库解决方案中包含的所有任务。
Table 1
表 1 与此活动相关的注意事项、警告、备注和/或知识库解决方案的列表
2. 这是指向热门服务主题的链接。这些主题可能与此活动相关,也可能无关。这只是一次主动尝试,目的
是让您了解可能与本产品相关的所有知识库文章。
注:在任何给定时间,此产品都可能没有热门服务主题。
VxRail Appliance Top Service Topics
Dell Technologies Confidential Information
version: 4.6.7.0
Page 3 of 11
VxRail Manager File-Based Backup
Requirements:
The file-based backup and restore mechanism is designed to help you recover the VxRail Manager in the
event of an unrecoverable failure. It requires you to use a backup script on the VxRail Manager virtual
machine to archive VxRail Manager configuration files, database tables, and optionally the logs, which
are then stored in a folder on the VxRail primary Datastore. This script can be run manually or set up for
automatic backups on a scheduled basis. If the VxRail Manager needs to be restored, the backed-up
configuration can be applied to restore the configuration files and database tables onto a newly deployed
VxRail Manager VM.
Notes:
• There are two scripts named vxm_backup_restore.py and vxm_backup_restore_limited_bandwidth.py.
These two scripts are identical from the procedure point of view. If you use the
vxm_backup_restore_limited_bandwidth.py script, simply replace the script name in the following
procedure.
• The vxm_backup_restore_limited_bandwidth.py script is designed for limited Internet bandwidth use
cases such as a 2-node VxRail cluster at a ROBO site with T1 lines where the backup and restore
process can take a long time to complete and might impact the user traffic to and from the cluster.
While the old script uses the vCenter as pass-through, this new script directly accesses the primary
datastore store on the host for both upload and download operations.
• If you have a dynamic node cluster and the primary storage type is vSAN HCI mesh, the primary
storage must be provisioned first. See KB 000185917.
This procedure applies to:
This procedure only applies to VxRail versions: 7.0.370 and later. See the VxRail 7.x Support Matrix for a
list of the supported 7.0.x versions.
Audience:
This procedure is intended for customers and Dell Technologies Service providers who are authorized to
work on a VxRail cluster and VxRail administrators.
Setup:
VxRail 7.0.370 or later cluster managed by either a VxRail vCenter Server or a customer-supplied
vCenter Server.
Prerequisites for restore:
These prerequisites are only applicable if you are restoring VxRail Manager. They are not needed if you
are doing a backup only.
• Download the VxRail Manager OVA file from dell.com/support that matches your current VxRail
Manager. You can look at the config.json file for the exact version.
• Deploying the VxRail Manager OVA requires a compatible browser with the vSphere Client
Integration plug-in enabled. Firefox with the Extended Support Release feature is compatible. The
stand-alone vClient is not supported to deploy the VxRail Manager virtual appliance from the OVA
file.
Dell Technologies Confidential Information
version: 4.6.7.0
Page 4 of 11
Backup VxRail Manager manually
1. [ ] Access VxRail Manager bash shell by with:
a. From vSphere Web Client, go to Home>VM and Templates>VxRail Manager.
b. On the Summary tab, click Launch Remote Console.
c. Log in as root.
d. Alternatively, ssh into VxRail Manager VM and log in with the username: mystic. The switch user
to root with the following command: su root
2. [ ] Run the backup script with the following commands:
To create a backup without the VxRail Manager logs:
cd /mystic/vxm_backup_restore/
Note: Use the vxm_backup_restore_limited_bandwidth.py
limited speed.
script if your environment has
3. [ ] Run the backup script (of your choice):
To create a backup without the VxRail Manager logs:
python vxm_backup_restore.py -b
To create a backup with the VxRail Manager logs included:
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py -b –-keeplog
Note:You might not be able to access some of the VxRail features during the backup process
because the script includes restarting the services. Wait around 2 to 3 minutes until the backup
finishes and the services are ready to be used.
4. [ ] To verify that the backup was completed, list the current backup copies with the following
command:
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py –l
5. [ ] (Optional) List current k8s services with the following command:
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py –d
6. [ ] After the first backup, back up the recoveryBundle .zip package to the primary datastore
manually.
Note: Task 6 is only required after the first-backup of a first run appliance and upgraded
appliance. For the upgraded appliance, replace the old recoveryBundle .zip with the new one.
a. Log in to the vCenter server using HTML5 client.
b. Open the SSH service of A host:
Select a Host > Configure > Services
Dell Technologies Confidential Information
version: 4.6.7.0
Page 5 of 11
Select SSH > Run
Select ESXi Shell > Run
c. Run the following command to back up the recoveryBundle .zip to the primary datastore.
SSH into VxRail Manager VM and log in with the username: mystic
Switch user to root with the following command: su root
For examples, vSAN cluster:
#scp/data/store2/recovery/recoveryBundle .zip
root@[hostIP]:/vmfs/volumes/VxRail-Virtual-SAN-Datastore******/VxRail_backup_folder/
For dynamic node cluster:
#scp/data/store2/recovery/recoveryBundle .zip
root@[hostIP]:/vmfs/volumes/<primary storage
name>/VxRail_backup_folder_******/
Configure automatic backup for VxRail Manager
Description
You can configure automatic backups for VxRail Manager. VxRail Manager will do the backup job
regularly or automatically, according to the backup policy defined.
Note: The backup script leverages the VxRail Manager OS time to run the periodical backup job. If the
VxRail Manager is not in your time zone, adjust the backup time to match the VxRail Manager time zone.
Procedure: Automatic backup
1. [ ] Before you schedule the backup, back up recoveryBundle .zip to the primary datastore manually.
Note: This step is only required on a first-run appliance and upgraded appliance. For the
upgraded appliance, replace the old recoveryBundle .zip with the new one.
a. Log in to the vCenter server using HTML5 client.
b. Open the SSH service of A host:
Select a Host > Configure > Services
Select SSH > Run
Select ESXi Shell > Run
c. Run the following command to back up the recoveryBundle .zip to the primary datastore:
SSH root@[hostIP]
For example, vSAN cluster:
# mkdir /vmfs/volumes/VxRail-Virtual-SAN-Datastore-******/VxRail_backup_folder
SSH into VxRail Manager VM and log in with the username: mystic
Switch user to root with the following command: su root
Dell Technologies Confidential Information
version: 4.6.7.0
Page 6 of 11
#scp /data/store2/recovery/recoveryBundle .zip
root@[hostIP]:/vmfs/volumes/VxRail-Virtual-SAN-Datastore******/VxRail_backup_folder/
Dynamic node cluster:
# mkdir /vmfs/volumes/<input this cluster primary storage name> /VxRail_backup_folder_*****/
SSH into VxRail Manager VM and log in with the username: mystic
Switch user to root with the following command: su root
#scp /data/store2/recovery/recoveryBundle .zip
root@[hostIP]:/vmfs/volumes/<input this cluster primary storage
ame>/VxRail_backup_folder_******/
2. [ ] Determine the VxRail Manager OS time zone with the following command:
# date
Wed Jun
3 10:55:53 UTC 2021
3. [ ] (Option 1) Set the backup policy using the command line. The options are:
Command-line option
--period
manual, daily, weekly, monthly
This determines how often the script is run
--hour
The hour to run the script
--minute
The minute to run the script
--rotation
The number of backups to maintain
--keeplog
With this option, VxRail Manager logs are included in
the backup.
Following is a backup policy configuration example. This example shows the VxRail Manager
backup happens every day at 1:15 AM, keeps 8 copies and backups the VxRail Managers logs.
Follow the same method to configure monthly or weekly backup policy.
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py -c --period daily --hour 1 --minute 15 -rotation 8 --keeplog
4. [ ] (Option 2) Set or change the backup policy using the wizard:
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py -c
Current user is root. We can do current job.
Download vxmbackup.json from datastore.
Connecting to vCenter [vc.app24.local]
domain-c27
Dell Technologies Confidential Information
version: 4.6.7.0
Page 7 of 11
data center path is /VxRail
download file http_url:
https://vc.app24.local/folder/VxRail_backup_folder/vxmbackup.json?dcP
ath=%2FVxRail&dsName=VxRail-Virtual-SAN-Datastore-35c360a9-23e0-4df3bb8e-55447a6bbab1
rotation_type: [daily], do you want to change it? [y|n]y
rotation_type: [daily]
Choose your rotation:
1) manual
2) daily
3) weekly
4) monthly
Choose rotation type. choose [1-4]:2
Current schedule time is 15:15. Change it? [y|n]y
Set hour with value [0-23], current is [15]:1
Set minute with value [0-59], current is [15]:15
Current rotation number is 8. Do you want to change it? [y|n]y
Set rotation number with value [7-24], current is [7]:8
Current keeplog flag is 1. Do you want to change it? [y|n]y
Set keep_log with value [0 - no log, 1 - keep log, current is [1]:1
---------update crontab--------15 1 * * * root /usr/bin/logger 'VxM rotation backup start.' && python
/mystic/vxm_backup_restore/vxm_backup_restore.py -b --keeplog
cronjob is updated.
Data center path is /VxRail
download file http_url:
https://vc.app24.local/folder/VxRail_backup_folder/vxmbackup.json?dcPath
=%2FVxRail&dsName=VxRail-Virtual-SAN-Datastore-35c360a9-23e0-4df3-bb8e55447a6bbab1
schedule config is updated and uploaded to datastore
{"rotation":[],"backup_policy":{"rotation_type":"daily","week_day":
"0","month_day":"1","backup_time_hour":"1","backup_time_minute":"15
","backup_file_limit":"8","keep_log":"1"}}
[Schedule config job END]
Dell Technologies Confidential Information
version: 4.6.7.0
Page 8 of 11
Note: The preceding is just one example for vSAN cluster. If using a dynamic node cluster, the
process is the same but the target backup folder changes as shown in the following example:
Download file location:
https://vc.app24.local/folder/VxRail_backup_folder_******/vxmbackup.json?dcPath
=%2FVxRail&dsName=<Here is VxRail cluster primary datastore name>.
Stop automatic backup for VxRail Manager
1. [ ] You can stop the automatic backup for VxRail Manager at any time. The previous backups are
still reserved on the primary datastore. To stop the automatic backup, enter the following commands:
cd /mystic/vxm_backup_restore/
python vxm_backup_restore.py -c --period manual
FAQ:
Q. What are the prerequisites to run the backup?
A. VxRail cluster must be in healthy status. vCenter Server can be internal or external.
Note: For internal DNS, original VxRail Manager and vCenter must be in healthy status.
Q. What are the prerequisites to run the restore?
A. vCenter must be in healthy status.
Note: For internal DNS, original VxRail Manager must be in healthy status.
Q. Is there any log output for the backup and restore script?
A. The log file is /var/log/mystic/VxRailBackupRestore.log.
Q. Where are the backup copies located?
A. The backup copies are located on the VxRail primary datastore in the VxRail_backup_folder for
vSAN cluster or VxRail_backup_folder_****** for dynamic node cluster.
Q. How does VxRail Manager perform the scheduled backups?
A. Linux crontab is used to run the scheduled backup job. The backup job is defined in
/etc/cron.d/vxm_schedule_backup.
Q. Backup data might not be up to date upon restore, can the restore script handle this situation?
A. Depending on the situation, the restore script might not be able to handle it. For example, if there
are 4 nodes in your cluster during backup, but a node addition/removal is later performed. The
node count is no longer 4. If you attempt to restore VxRail Manager with the 4-node backup copy,
Dell Technologies Confidential Information
version: 4.6.7.0
Page 9 of 11
the restore script will detect it and pop up a warning to let you decide whether to move forward
with the restore.
Note: We recommend doing a manual backup immediately after a service procedure such as
node addition/removal/replacement.
Q. Does VxRail Manager IP address revert to the original VxRail Manager IP address after a
restore?
A. Yes, the network identifiers like IP address/hostname/DNS/route/gateway/SSL certificate are the
same as the original VxRail Manager. Only the Mac address is changed.
Q. Can I directly use the original VxRail Manager IP address on the newly deployed VxRail Manager
for restore?
A. No, you cannot. You must provide a different IP address for temporary use.
Q. Can I move the backup copies to another location such as an FTP server?
A. Yes, you can. Remember to move the backup files in the VxRail_backup_folder for vSAN cluster
or VxRail_backup_folder_****** for dynamic node cluster on the VxRail datastore along with the
vxmbackup.json file. Before you attempt a restore, you will need to upload both the backup files
and vxmbackup.json file to the VxRail_backup_folder for vSAN cluster or
VxRail_backup_folder_****** for dynamic node cluster on the VxRail datastore.
Q. Can I delete a backup copy manually?
A. Yes, you can. The backup files are in the VxRail_backup_folder for vSAN cluster or
VxRail_backup_folder_****** for dynamic node cluster on the VxRail datastore; the format is
VxRailArchive_YYYYMMDDHHMMSS_XXXXXXX.tgz. Use the Datastore File Browser to delete
the backup copy. Ensure that you are removing the correct backup copy.
Q. Can I restore a VxRail Manager backup copy onto itself?
A. The code does not prevent you from doing this, and you can do it multiple times for testing
purposes. But when restoring in a production environment, we highly recommend you deploy a
new empty VxRail Manager and then perform the restore.
Q. What should I do if restore failed?
A. Delete the newly deployed VxRail Manager and retry the operation.
Q. What should I do if restore failed due to connection error with vCenter?
A. Check your network environment. Ensure that the gateway and netmask are configured
successfully with this command:
# ip route
Dell Technologies Confidential Information
version: 4.6.7.0
Page 10 of 11
Q. What is the recommended backup frequency?
A. Weekly backups should suffice depending on your requirement. Also, you should always do a
manual backup immediately after node addition or node removal.
Q. I ran into following error while performing backup/restore, what should I do?
/tmp/vxm_backup_restore.pid already exists, exiting
wait 30 seconds retry[1/10]
A. You might have another backup or restore job running. If you are sure that no other backup or
restore job is running, manually delete /tmp/vxm_backup_restore.pid.
Q. Will the scheduled backup job keep running on a restored VxRail Manager if it was configured on
the original VxRail Manager?
A. No. You must enable it again.
Q. Can I do VxRail Manager restore in an environment where the VxRail Manager/vSphere
Center/ESXi host certification was changed after backup?
A. No, you should always do a manual backup immediately after VxRail Manager/vSphere
Center/ESXi host certification was changed.
Q. How can I find the /etc/resolv.conf file, if external DNS original VxRail Manager is not available?
A. You can perform these steps manually.
a. SSH into VxRail Manager VM and log in with the username: mystic
b. Switch user to root with the following command: su root
c. Open the /etc/hosts file with a text editor like “vi”
d. Add the following lines:
search [Domain Name]
nameserver [DNS server IP]
e. Save and close the file.
Q. Why can I not implement some of the VxRail features while running the backup?
A. The script will restart VxRail Manager services during the backup progress. You might need to
wait for 2-3 minutes until the services are brought back.
Dell Technologies Confidential Information
version: 4.6.7.0
Page 11 of 11
Download