0% found this document useful (0 votes)
6 views11 pages

Microsemi TP102 Product Training AutoMySQLBackup

Uploaded by

PABLO LEON
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

Microsemi TP102 Product Training AutoMySQLBackup

Uploaded by

PABLO LEON
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Power Matters.

TimePictra 10.2

February, 2014

© 2013 Microsemi Corporation. Company Proprietary.


TimePictra AutoMySQL Backup

Power Matters.™
Agenda
 Install the backup tool
 Configure the conf file
 Test the backup
 Create the Cron Entry
 Restore a database
 Start TimePictra 10
 To make a backup on demand
 To delete a Database for Testing of TP10 Restore

Power Matters.™
Install the backup Tool
 Obtain file automysqlbackup-v3.0_rc6.tar.gz
 Copy to the tmp folder
 Execute “tar -xvf automysqlbackup-v3.0_rc6.tar.gz”
 As root, run the “install.sh” script and accept all the defaults
 Create the backup directory and own as tpadmin
 Execute “mkdir /var/backup”
 Execute “chown tpadmin:tpgroup /var/backup”
 Execute “chown -R tpadmin:tpgroup /etc/automysqlbackup”
 Execute “chmod 555 /usr/local/bin/automysqlbackup”

Power Matters.™
Configure the conf file

 As user tpadmin, edit the file


“/etc/automysqlbackup/automysqlbackup.conf”
 Uncomment and edit the following lines
CONFIG_mysql_dump_username='root'
CONFIG_mysql_dump_password='r00tr00t' ( or the local
password )
CONFIG_mysql_dump_host='localhost'
CONFIG_backup_dir='/var/backup/db'
CONFIG_db_names=('NGS')
 Save the file

Power Matters.™
Test the Backup

 As user tpadmin, run the command “automysqlbackup”


 Verify a file is created under " /var/backup/db/daily/NGS"

Power Matters.™
Create the Cron Entry

 As user tpadmin, execute "crontab -e"


 Add a line
00 01 * * * /usr/local/bin/automysqlbackup > /tmp/automysqlbackup.log

Power Matters.™
Restore a Database

 Create a new blank Database using the tool "tputility"


 Select the file you wish to restore from the directory
“/var/backup/db/daily/NGS"
 "gunzip" the required file
 Restore the database with the command
mysql -u root -p NGS < var/backup/db/daily/NGS/<<backupfile.sql>>

Power Matters.™
Start TimePictra 10

 As user root, execute “service TimePictra start”

Power Matters.™
To make a backup on demand

 As user tpadmin, execute "automysqlbackup"

Power Matters.™
To Delete a Database for Testing of TP10 Restore

 As user root, execute “service TimePictra stop”


 As user tpadmin, execute “mysql -u root –p”
 Execute “drop database NGS;”
 Execute “commit ;”
 Execute “exit”

Power Matters.™

You might also like