• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

How do you backup MySQL with TSM

kim_mitchell

ADSM.ORG Member
Joined
Jan 3, 2004
Messages
27
Reaction score
0
Points
0
TSM currently doesnt have a backup agent for MYSQL atleast that Im aware of. I need to back up a MYSQL db and it was suggested to me that I stop the MYSQL service on the Windows 2000 server then backup the DB then restart the service when the backup is complete. Does anyone have any sugggestion on how to backup MYSQL databases.



Thanks



KIM
 

bstanek

ADSM.ORG Member
Joined
Sep 18, 2002
Messages
14
Reaction score
0
Points
0
Website
http
Hi,



well we first create a dump of all databases, gzip them and then backup/archive them with TSM.

Here's my script:



/usr/bin/mysqldump -u#### -p#### --all-databases -a > /misc/backups/MySQL/$(date +%Y%m%d).sql



tar cf - /misc/backups/MySQL/$(date +%Y%m%d).sql | gzip -c > /misc/backups/MySQL/$(date +%Y%m%d).tar.gz



Then dsmc archive ..... and so on



Bye Bruno
 

john_vincent

ADSM.ORG Member
Joined
Oct 15, 2004
Messages
4
Reaction score
0
Points
0
There's a better option than doing a full shutdown.



With our warehouse, we do the following in our cronjobs:



mysqlhotcopy --allowold --flushlog -u <username> --password=<password> <dbname> /var/backups/mysql/



then dsmc the rest.



If you aren't happy with having the password in the script, create a user who only has permissions from localhost to the databases you need backed up (SELECT,REFERENCES,LOCK TABLES,INDEX,TMP TABLES - I think) and set no password. Run the script as that user with sudo or as a cronjob for the user.



This only works for MyISAM table types. If you're using InnoDB, you'll need the commercial InnoDB hotbackup utility..



I just saw that someone posted a similar suggestion that does a dump and then tars the whole thing up. I actually like to keep each database separate so I can restore only what I want.
 

mszary

ADSM.ORG Member
Joined
Jul 10, 2007
Messages
53
Reaction score
0
Points
0
Location
Poland
/usr/bin/mysqldump -u#### -p#### --all-databases -a > /misc/backups/MySQL/$(date +%Y%m%d).sql

tar cf - /misc/backups/MySQL/$(date +%Y%m%d).sql | gzip -c > /misc/backups/MySQL/$(date +%Y%m%d).tar.gz

Bye Bruno
Hello there. Imagine, the first step had started before midnight and finished after midnight :) The second part would not have anything to tar/gzip :)

I'd suggest setting timestamp variable once and use it later on:

Code:
TIMESTAMP=`date +%Y%m%d`
/usr/bin/mysqldump -u#### -p#### --all-databases -a > /misc/backups/MySQL/$TIMESTAMP.sql

tar cf - /misc/backups/MySQL/$TIMESTAMP.sql | gzip -c > /misc/backups/MySQL/$TIMESTAMP.tar.gz
Regards,
Marcin.
 

[email protected]

ADSM.ORG Member
Joined
Jan 26, 2007
Messages
3
Reaction score
0
Points
0
We are trying to use adsmpipe on SUSE 10. We have it loaded but we are not sure of the correct syntax. Any hints?

Thanks
 

madunix

ADSM.ORG Member
Joined
Aug 5, 2008
Messages
91
Reaction score
1
Points
0
it looks that TSM cant work with MySQL ...
 

daleto

Active Newcomer
Joined
Apr 10, 2005
Messages
10
Reaction score
0
Points
0
Website
Visit site
You can restore to any point in time with "Data Protector for MySQL using IBM Tivoli Storage Manager".
It uses the mysql bin-logs to rollforward to the given point in time.
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 20 18.9%
  • Keep using TSM for Spectrum Protect.

    Votes: 64 60.4%
  • Let's be formal and just say Spectrum Protect

    Votes: 13 12.3%
  • Other (please comement)

    Votes: 9 8.5%

Forum statistics

Threads
31,837
Messages
135,770
Members
21,788
Latest member
london
Top