The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: MySQL? XML? mysqldump?
Author: csinclair 
Date:   21-11-06 16:40

Hi Dan,
I have been backing up a mediawiki server for several months using the mysqldump option, (see code example 1). I'm afraid of re-importing the data when I need to, (due to box migration or crash, either of which should be coming soon). I'd love to hear your thoughts on how to make this easier, maybe scripting the entire process in 2 parts (Export/Import).

<code snippet>

#www/data backup
tar -cf - /usr/local/www/data-dist/* | gzip -c > ~/bak/$1_www_data.tar.gz
#mysql db backup
sqldump --user=root --password=******** wikidb > ~/bak/$1.mysql.dump
tar -cf - ~/bak/$1.mysql.dump | gzip -c > ~/bak/$1_mysql_dump.tar.gz
rm ~/bal/$1.mysql.dump

</code snippet>
As you can clearly see I'm not using the xml option, I would if I thought it would be helpful, please explain.
Also, what about all of my graphic images on the server as well, I've been tar.gz'ing them with the script as well, but I'm not too sure how the images will fare in the tarring/untarring as well as how to automate or ease the transition when moving the Wiki database, pictures and all.
Any tips or pointers on this topic are appreciated as I'll have to use this soon in the real world.

Use the source Luke...

Post Edited (21-11-06 11:41)

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 MySQL? XML? mysqldump?   new
Dan 27-09-06 18:32 
 Re: MySQL? XML? mysqldump?   new
csinclair 21-11-06 16:40 
 Re: MySQL? XML? mysqldump?   new
Dan 21-11-06 16:55 
 Re: MySQL? XML? mysqldump?   new
Dan 21-11-06 16:59 
 Re: MySQL? XML? mysqldump?   new
csinclair 23-11-06 01:11 
 Re: MySQL? XML? mysqldump?   new
Dan 23-11-06 01:21 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum