Backup and restoration methods for vCSA6.0 Databases

Source: Internet
Author: User

Backup and restoration methods for vCSA6.0 Databases

VCSA: vCenter Server Appliance is a Linux-based virtualization management platform. Unlike vCSA5.x, when vCSA5.x is used, you only need to import the OVF template, but vCSA6.x is no longer an OVF template, but an ISO file. We need to deploy it through a browser. We will explain the deployment process in detail in the future, today, I want to talk about database backup and restoration of vCSA6.x;

In vCSA6.x, database backup and restoration are also different from those in vCSA5.x. vCSA5.x is used in Embedded DB2 databases, while vipvs is used in vCSA6.x databases. Of course, you can also use an external database Oracle, however, the official website does not support MSSQL;

In enterprises, we must ensure data security. To ensure the data security of the vCSA management platform, we need to ensure the security of databases, the following describes how to back up and restore a database;

I. Database Backup:

1. Access the SSH connection as administrator root. The root directory contains the following files;

DBBackup. sh: Back up data to the file server 192.168.0.189 script;

Backup_lin.py database backup script;

Restore_lin.py database restoration script;

The script details are as follows:

DBBackup. shmount-tcifs // 192.168.0.1/VCSADB_backup/mnt/DBbackup-ousername = lidongni, password = password, domain = lidongni. comBKTime = $ (date + % Y % m % d) _ VCDB. bakpython/root/backup_lin.py-f/mnt/DBbackup/$ BKTimeumount/mnt/DBbackup

Because the official script itself cannot meet my normal needs, I have added a scheduled task backup on the basis of the official script to back up the corresponding database to a dedicated backup server;

The other two scripts are too long. You can download them from VMware;

2. Add a scheduled task:

vcsa6:~#crontab-l#DONOTEDITTHISFILE-editthemasterandreinstall.#(/tmp/crontab.XXXXXglKmPinstalledonThuDec3115:06:582015)#(CronversionV5.0--$Id:crontab.c,v1.122004/01/2318:56:42vixieExp$)3022***/root/DBBackup.shvcsa6:~#crontab-e3022***/root/DBBackup.sh

Backup is performed at every night;

3. Restart the cron task:

vcsa6:~#servicecronrestartShuttingdownCRONdaemondoneStartingCRONdaemondone

Effective configuration;

4. The test backup result takes effect:

Restoring a database is simpler than backing up a database. The detailed operations are as follows:

Ii. Database restoration methods:

Run the following command to stop the vmware-vpxd and vmware-vdcs services:

servicevmware-vpxdstopservicevmware-vdcsstop

Run the restore_lin.py file and provide the location of the backup file. For example, to save the backup file as/mnt/DBBackup/20151231_VCDB.bak, run the following command:

python/root/restore_lin.py-f/mnt/DBBackup/20151231_VCDB.bak

After the restoration is completed, you will see a message indicating that the restoration is successful.

Run the following commands to start the vmware-vpxd and vmware-vdcs services:

servicevmware-vpxdstartservicevmware-vdcsstart

Note: After vCSA is installed, the time zone is not CST, but UTC. Therefore, before we schedule a task, we need to modify the time zone to avoid database backup time errors, for details about how to modify the time, see my personal blog: www.lidongni.com.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.