Mysql Backup
Mysql Backup
MySQL Backup
VCenterdan ilk önce 5GiB'lk thin disk eklenir. Master'a direk gidiyorsa 15GiB'lk thin alan verilebilir.
fdisk -l
fdisk /dev/sdc (n p t 8e)
pvcreate /dev/sdc1
vgs
vgextend
vg_sql /dev/sdc1
vgs
scp -r 10.35.72.147:/opt/netbackup/NetBackup_8.1.2_CLIENTS2 .
scp -r 10.35.72.147:/opt/netbackup/NBMySQLAgent_8.1.2.zip .
# $Header$ */
# $Copyright: Copyright (c) 2018 Veritas Technologies LLC. All rights reserved $
# Filename: nbmysql.conf
# NetBackup MySQL Agent configuration file
#--------------------------------------------------------------------------------------------------------
----
# MySQL Database server port number.
# Configure this parameter for backup and restore.
# eg., DB_PORT=3307. If not configured, default value of "3306" is considered.
# Configure and uncomment this parameter to override the default value.
#--------------------------------------------------------------------------------------------------------
----
DB_PORT=3306
#--------------------------------------------------------------------------------------------------------
----
# MySQL Library path
# Configure this parameter for backup.
# On Windows, configure this parameter to point to libmysql.dll. eg., MYSQL_LIB_INSTALL_PATH=C:\Program
Files\MySQL\MySQL Server 5.7\lib
# On Linux, configure this parameter to point to libmysqlclient.so. eg., MYSQL_LIB_INSTALL_PATH=/usr
/lib64/mysql
#--------------------------------------------------------------------------------------------------------
----
# MYSQL_LIB_INSTALL_PATH=
MYSQL_LIB_INSTALL_PATH=/usr/lib64
[NetBackup parameters]
#--------------------------------------------------------------------------------------------------------
----
# Identifies the host name for the NetBackup Master Server.
# Configure this parameter for all operations - backup. restore, query and delete.
# eg., MASTER_SERVER_NAME=nb_master
#--------------------------------------------------------------------------------------------------------
----
# MASTER_SERVER_NAME=
MASTER_SERVER_NAME=aslvrtpbck02.host.gittigidiyor.net
#--------------------------------------------------------------------------------------------------------
----
# Identifies a specific NetBackup datastore policy name to be used.
# Configure this parameter for backup and query.
# eg., POLICY_NAME=datastore_policy
#--------------------------------------------------------------------------------------------------------
----
# POLICY_NAME=
POLICY_NAME=A_MYSQL_ELKPMYQ01
#--------------------------------------------------------------------------------------------------------
----
# Identifies the Default Application Backup schedule name associated with the
# datastore policy name provided by POLICY_NAME.
# Configure this parameter for backup.
# eg., SCHEDULE_NAME=Default-Application-Backup
#--------------------------------------------------------------------------------------------------------
----
# SCHEDULE_NAME=
SCHEDULE_NAME=full
#--------------------------------------------------------------------------------------------------------
----
# Identifies the host name for the NetBackup Client.
# Configure this parameter for redirected restores and to query for backup information specific to a
client.
# eg., CLIENT_NAME=nb_client. If not configured, default value will be current hostname.
#--------------------------------------------------------------------------------------------------------
----
# CLIENT_NAME=
CLIENT_NAME=aslelkpmyq01.host.gittigidiyor.net
#--------------------------------------------------------------------------------------------------------
----
# Identifies the Backup Id or Copy Id.
# This value can be retrieved by performing a query operation.
# Configure this parameter to restore backups associated with this Backup Id or Copy Id.
# eg., COPY_ID=1500234512
#--------------------------------------------------------------------------------------------------------
----
# COPY_ID=
#--------------------------------------------------------------------------------------------------------
----
# Identifies the target directory for restores.
# Configure this parameter for restore.
# Please ensure that it is a valid MySQL instance data directory. Otherwise the user will have to
# manually copy it over to the appropriate MySQL instance data directory after restore is completed
# and then start the MySQL service.
# On Linux alone, after copying the restored files over to the appropriate MySQL instance data
directory,
# please change the files/directories ownership and group to "mysql" before restarting the MySQL service.
# $chown -R mysql <data_dir> #changes the ownership to "mysql"
# $chgrp -R mysql <data_dir> #changes the group to "mysql"
# On Windows, eg., MYSQL_TARGET_DIRECTORY=C:\ProgramData\MySQL\MySQL Server 5.7\data
# On Linux, eg., MYSQL_TARGET_DIRECTORY=/var/lib/mysql
#
---------------------------------------------------------------------------------------------------------
--
# MYSQL_TARGET_DIRECTORY=
#--------------------------------------------------------------------------------------------------------
----
# Log size for nbmysql.log in MB.
# nbmysql.log will be generated in the nbmysql install directory .
# eg., NBMYSQL_LOG_SIZE=20. If not configured, the default size is set to 10MB.
# Configure and uncomment this parameter to override the default value.
#--------------------------------------------------------------------------------------------------------
----
# NBMYSQL_LOG_SIZE=10
cd /usr/openv/netbackup/ext/db_ext/
mkdir mysql
chown root.bin mysql
cd mysql/
vim mysql_netbackup
chown root.bin mysql_netbackup
chmod 777 mysql_netbackup
mysql_netbackup
#!/bin/sh
#bcpyrght
#***************************************************************************
#* $Copyright: Copyright (c) 2017 Veritas Technologies LLC. All rights reserved VT25-0977-2658-84-51-3 $
*
#***************************************************************************
#ecpyrght
RETURN_STATUS=0
su root -c "$CMD_LINE"
RETURN_STATUS=$?
exit $RETURN_STATUS
vim /etc/sudoers
Defaults:root !requiretty
nbbackup usernn mysql_config_editor
ASWVIRPVCA02 makinesine balanlr. Yeni policy oluturulur. Varolan policyde kopyalanp, gerekli deiiklikler yaplabilir.
Örnek Attributes ayarlar aadaki görseldeki gibidir. policy storage ayaralarna NetBackup Management Stroge Stroge Lifecycle
Policies bölümünden ulaabilirsiniz.
/usr/openv/netbackup/ext/db_ext/mysql/mysql_netbackup