NetBackup105_AdminGuide_MySQL
NetBackup105_AdminGuide_MySQL
Administrator's Guide
Release 10.5
Last updated: 2024-09-23
Legal Notice
Copyright © 2024 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, and NetBackup are trademarks or registered trademarks of Veritas
Technologies LLC or its affiliates in the U.S. and other countries. Other names may be
trademarks of their respective owners.
This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.
http://www.veritas.com
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan CustomerCare_Japan@veritas.com
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
NB.docs@veritas.com
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
Step 1 ■ Open a web browser and go For more information on signing in see
to the URL the Sign into the NetBackup web UI in
■ Enter your credentials and NetBackup Web UI Administrator’s Guide.
click Sign in. Note: To perform the MySQL
■ On the left, click Security > administrator tasks, the Default MySQL
RBAC. Click Add. Administrator role should have the
■ Select Default MySQL minimum required RBAC permissions.
Administrator and provide a
Role name, Role
description, and the required
permissions. Then assign a
user to this role.
Step 3 Add and manage credentials. See “Manage credentials for an instance”
on page 12.
Overview 7
Overview of NetBackup for MySQL
Step 5 Protect MySQL instances and See “Protect MySQL instances and
databases. databases” on page 20.
Step 6 Restore MySQL instances and See “Restore a MySQL instance and
databases. database ” on page 24.
Chapter 2
Managing MySQL
instances and databases
This chapter includes the following topics:
Deploy the NetBackup to protect MySQL On a very high level to protect MySQL instances and databases you
instances and databases. need:
(optional) MySQL installed bin directory path Verify if MySQL installation bin path is set in environment variable. For
should be added to path environment variable. Example:
Protecting MySQL instances and databases. See “Protect MySQL instances and databases” on page 20.
For Windows, user can create new environment variable and add path of folder
location as below:
MYSQL_BACKUP_DUMP_DIRECTORY=C:\custom_dump_dir_location
Note: Ensure that provided backup dump directory is empty as post backup its
content will be auto-deleted.
For Windows:
MYSQL_OPT_SSL_KEY_3306=C:\mysql_certificate_folder\client-key.pem
For Linux: echo "export
MYSQL_OPT_SSL_KEY_3306=/mysql_certificate_folder/client-key.pem"
>> ~/.bashrc
3 Enter or use the up, down arrow keys to add details of Port number.
4 Click Next.
Note: You will be redirected to the Permissions page and you can also manage
credentials of the created instance.
5 Click Finish.
Note: If you click Previous, instance created will not get saved.
3 Click Next.
3 Select the required instance from the list of instances for which you need to
discover the databases.
4 Click Discover.
Note: The tab lists the names of instances that you have access to.
2 Select the MySQL instance from the list of instances that you have access to.
3 Select Actions > Remove or select Remove from top bar.
Note: If you remove an instance, all databases that are associated with the
removed MySQL instance will also get removed.
4 If you are sure that you want to remove the MySQL instance, click Remove.
Note: Manually remove the Instances and the associated databases which
are deleted from the MySQL Server.
Note: The range from which you may choose is 1 hour to 24 hours. To set the
autodiscovery frequency in minutes or seconds or to disable autodiscovery,
you must use the MySQL autodiscovery API.
Chapter 3
Managing MySQL
environment credentials
This chapter includes the following topics:
4 Click Next.
5 Select MySQL server from the Category drop-down.
6 Enter Instance username and Instance user password and click Next.
Managing MySQL environment credentials 16
Default MySQL Administrator
Type Permissions
Jobs View
Type Permissions
Assets
Note: NetBackup verifies the current credentials for the selected MySQL instance.
If the credentials are not valid, NetBackup indicates Invalid under Credentials.
For auto-discovered cluster instances, assign credentials for MySQL source or
replica node instance.
Note: When you update MySQL instances, this action automatically starts the
discovery of the MySQL instance.
Warning: Apply another credential to any asset that uses the credential you want
to delete or else backup and restore may fail for those assets.
User Privileges
To set the database user privileges, run the following command at MySQL command
line:
Protecting MySQL instances and databases 20
Protect MySQL instances and databases
Note: The user with assigned RBAC role must have access to the assets that you
want to manage and also to the protection plans you want to use.
■ Backup options
■ Snapshot: This option is used to take the snapshot of an instance. For
Windows - VSS snapshot method is used. For Linux - LVM snapshot
method is used.
■ Mysqldump: It is an utility of MySQL which performs logical backup of
instance as well as individual database. It is recommended in case of
non-lvm deployment.
Protecting MySQL instances and databases 21
Customize protection settings for the MySQL assets
Adjust the Database options like Job limit and Backup method.
5 Click Protect.
Note: This action allows custom protection for the asset and removes it from
the original protection plan. Any future changes to the original plan are not
applied to the asset. The customization operation cannot be reversed.
5 Click Protect.
Note: When you unsubscribe an asset from a protection plan, there is a possibility
that the asset displays Classic policy in the Protected By column on the web UI.
This situation can happen when an asset is subscribed to a protection plan and a
backup runs for that asset. Such assets get unsubscribed from the protection plan.
The web UI then displays Classic policy, that may or may not have an active policy
protecting the asset.
Note: If the asset has been backed up, but status indicates that it has not, you
will get an error. See “Error while backup of MySQL asset” on page 36.
3 If the asset is not protected, click Add protection to select a protection plan.
Chapter 5
Restoring MySQL
instances and databases
This chapter includes the following topics:
■ Things to know before you restore the MySQL instances and databases
■ Limitations
Note: In the calendar view, dates with available backups are indicated with a
green dot.
5 From the listed Backup images/ Recovery points, select the desired image
or recovery point.
Note: The backup images or recovery points are listed in rows with the
respective backup timestamp.
8 Select the appropriate instance directory path from one of the following options:
■ Restore everything to original location: Files are restored to the location
where they were originally backed up from.
■ Restore everything to a different location: Files are restored to alternative
location that you can specify. The folder structure of the restored data within
Restoring MySQL instances and databases 25
Restore a MySQL instance and database
the alternate location will be the same as that of the original data that is
same folder and sub-folder setup.
■ Directory for restore - This is MySQL data directory. MySQL full backup
data and binary logs would be restored to the specified path.
Note: For LVM and VSS if Restore and Recovery option is selected, then
contents of target data directory would be deleted by recovery operation.
Note: In the Restore and recovery option, the MySQL service must be up
and running. If the service is stopped, the restore will fail. The data folder must
be empty, to run the Restore option on the same path. If the folder is not empty,
then, the data will not restored.
13 Click Next.
14 On the Review tab, review the details and click Start recovery.
4 On the Recovery points tab, select the date with available backup.
Note: In the calendar view, dates with available backups are indicated with a
green dot.
5 From the listed Backup images/ Recovery points, select the desired image
or recovery point.
Note: The backup images or recovery points are listed in rows with the
respective backup timestamp.
13 Click Next.
14 On the Review tab, review the details and click Start recovery.
Target client Checks if target client is Target client and Target client name
connectivity accessible from restore client.
Target client Checks if the required space Target client alternate location
location space is available on target client
alternate location.
Note: Required space is total
size of selected file with space
required for restore and space
needed for logs and other
files.
Target client Checks if provided user is an Target Target client alternate location
alternate location owner and has RBAC
permissions permissions on target client
alternate location.
Restore Restore backup images of MySQL asset. Global > NetBackup Assets > MySQL
management > Assets > Restore
This permission is required on MySQL.
NetBackup backup to alternate
images > View location
Note: Post restores, change the attributes of the restored data directory and
files by using the following command.
attrib -S restore_path/*.* /S /D
4 Copy all the contents of the restored data directory to MySQL data directory.
Restoring MySQL instances and databases 30
Steps to perform recovery after restore operation
Note: The binlogs from the incremental backups get restored to the target
directory in the MyBINLOGS directory.
■ For Linux:
mysqlbinlog restore_directory/MyBINLOGS/* | mysql -u user -P port
-p
■ For Linux:
mysql --host=host --user=user --port=port -p database_name <
restore_path\mysqlBackup_Dump_xxx.sqlx
■ For Linux:
mysql --host=host --user=user --port=port -p <
restore_path\mysqlBackup_Dump_xxx.sqlx
■ For Linux
mysqlbinlog restore_directory/* | mysql -u user -P port -p
■ START SLAVE;
■ For windows
Either use WinSCP or do it manually.
On replica:
■ mysql -u user -P port -p <
destimation_path_of_source-data.sql_file
■ On replica:
■ stop slave;
■ reset slave;
■ reset master;
■ start slave;
Limitations
■ Cross-platform recovery of individual files is not supported. The restore client
must be the same platform as the instances that you want to restore. Windows
instances can be restored using Windows operating systems and Linux instances
can be restored only using Linux operating systems.
■ For client platform and file system support and limitations, see
https://www.veritas.com/content/support/en_US/doc/NB_70_80_VE .
■ If a backup and a restore occur simultaneously on the same database, one or
both jobs can have unexpected results.
Restoring MySQL instances and databases 33
Limitations
Note: If a backup or a restore exits with a non-zero NetBackup status code, one
possible cause is simultaneous jobs occurring on the same instance.
■ Restore job fails, if NetBackup does not have sufficient privileges or if there is
insufficient space in the client memory.
■ NetBackup does not support non-ASCII characters in target client location path.
Chapter 6
Troubleshooting MySQL
operations
This chapter includes the following topics:
Credential validation failed. The host’s name is not valid NetBackup client. Ensure that
Provide correct host name. the hostname is registered client of NetBackup and it is
whitelisted.
Table 6-2 Error run into during the MySQL instance and database discovery
phase
The MySQL assets are not discovered Run discover database and retry the database discovery manually.
after the correct MySQL instances
■ Ensure that the update permission assigned to the logged in web UI user.
credentials are added.
■ Contact Veritas Technical support and share nbwebservice logs from
NetBackup master server and ncfnbcs logs from NetBackup client.
A plan with this name already Protection plan with same name is already present.
exists.
■ Please create protection plan with another name.
Storage disk pool is not Before adding protection, we need to add storage Unit.
present
■ Please add Storage Unit from Storage Configuration
>Add.
Troubleshooting MySQL operations 36
Error while subscribing protection plan to MySQL asset
This subscription must be If subscription has been already modified, the below warning
reset to protection plan message will be displayed.
defaults before it can be
■ User can reset subscription using 'Restore original
customized.
settings' button and then try to customize subscription
again.
Storage disk pool is not Before adding protection, we need to add storage Unit.
present
■ Please add Storage Unit from Storage Configuration
>Add.
Failed to backup the requested files. Verify the MySQL service is up and running
on client.
Unable to change the Host while If you cannot see the list of the host, you might not have access to NetBackup
modifying the restore Host in RBAC.
target/destination.
■ Contact the NetBackup security administrator to resolve this issue.
Restore failed with below error: If the database user provided for restore operation is different from the backup
Restore initiated from XBSA Failed to operation database user. The permission of file differs in the NetBackup file
query the object... 17 system and hence restore fails.
■ Use the same database user for restore which was used while taking
backup of asset, so that file system permissions will be available to the
restore user as well.
Restore Image not found at alternate No image was found on recovery host alternate location
location on recovery host.
■ Contact Veritas Technical support and share tar log from the recovery
host.
Chapter 7
API for MySQL instances
and databases
This chapter includes the following topics:
GET
/netbackup/admin/discovery/workloads
/mysql/status
POST
/netbackup/admin/discovery/workloads
/mysql/allclientsdiscovery
API for MySQL instances and databases 40
Using APIs to manage, protect or restore MySQL
■ policyType is DataStore.
POST ■ Add scheduleName can have values like FULL_AUTO
/netbackup/servicecatalog/slos or INCR_AUTO for adding MySQL instance.
■ keyword can have the following values to back up an
instance or database using different backup options:
POST
/netbackup/servicecatalog/slos/{sloId} • mysqldump
/subscriptions • Snapshot
■ sloId is the identifier to protection plan
■ selectionId is the AssetId which needs to be
POST subscribed with given sloId
/netbackup/servicecatalog/slos/{sloId}
/backup-now
After you create a protection plan, other processes like creating the schedule for
the policy or triggering the policy backup remain the same.
GET
/netbackup/wui/workloads/mysql
/recovery-point-calendar-summary
API for MySQL instances and databases 41
Using APIs to manage, protect or restore MySQL