如何进行备份和还原vCenter Server Appliance vPostgres数据库
vCenter Server Appliance vPostgres数据库的备份和还原是非常重要的,因为它包含管理vCenter Server环境的所有信息。备份和还原vCenter Server Appliance vPostgres数据库的步骤如下:
1. 停止vCenter Server Appliance服务:
systemctl stop vsphere-client.service
systemctl stop vsphere-ui.service
systemctl stop vmware-vpxd.service
2. 进入VCSA命令行界面:
shell.set –enabled true
shell
3. 进入/storage/db目录:
cd /storage/db
4. 导出vPostgres数据库:
pg_dump vpostgres > vpostgres_dump.sql
5. 备份/storage/db目录下的其他文件:
cp -pr * /
6. 重新启动vCenter Server Appliance服务:
systemctl start vmware-vpxd.service
systemctl start vsphere-ui.service
systemctl start vsphere-client.service
7. 进入VCSA命令行界面:
shell.set –enabled true
shell
8. 进入/storage/db目录:
cd /storage/db
9. 删除现有的vPostgres数据库:
rm -rf *
10. 从备份中恢复vPostgres数据库:
pg_restore -d vpostgres /
11. 重新启动vCenter Server Appliance服务:
systemctl start vmware-vpxd.service
systemctl start vsphere-ui.service
systemctl start vsphere-client.service
相关文章