LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2010, 12:30 PM   #1
bigmen
LQ Newbie
 
Registered: Oct 2009
Posts: 8

Rep: Reputation: 0
Backup /var/lib/mysql are good idea?


Hello. I have MySQL server, where in databases are many polish letters, and sometimes when we must move database, or repair it from backup polish letters lost.

So my question it's: backup MySQL by tar /var/lib/mysql are good idea? When i must rebuild databases i wont' lost polish letters? I know that when i load backup MySQL versions must be the same.

Sorry for my english.

Last edited by bigmen; 04-09-2010 at 12:31 PM.
 
Old 04-09-2010, 01:59 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
Quote:
backup MySQL by tar /var/lib/mysql are good idea?
It's bad idea. You can get not consistent backup. To get a consistent backup you should stop the server or do a LOCK TABLES on the relevant tables.
Making Backups with mysqldump or mysqlhotcopy is better idea.
http://dev.mysql.com/doc/refman/5.1/...p-methods.html

Last edited by troop; 04-09-2010 at 02:01 PM.
 
Old 04-09-2010, 02:48 PM   #3
bigmen
LQ Newbie
 
Registered: Oct 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for reply. Last time i have to import mysql from backup (it do every day from command: mysqldump -h localhost -u root -ppass database --compatible=mysql40 | gzip > /database.sql.gz), but i don't have polish letters (instead polish letter was "?") - backup file already didn't have polish letters, so after import too.

So what i have to do, to create 100% good backup?
 
Old 04-09-2010, 06:34 PM   #4
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
Quote:
Originally Posted by bigmen View Post
Thanks for reply. Last time i have to import mysql from backup (it do every day from command: mysqldump -h localhost -u root -ppass database --compatible=mysql40 | gzip > /database.sql.gz), but i don't have polish letters (instead polish letter was "?") - backup file already didn't have polish letters, so after import too.

So what i have to do, to create 100% good backup?
Mark the thread as "[SOLVED]" if it's solved.This option is under the Thread Tools above.
 
0 members found this post helpful.
Old 04-09-2010, 09:20 PM   #5
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
Quote:
Originally Posted by bigmen View Post
Thanks for reply. Last time i have to import mysql from backup (it do every day from command: mysqldump -h localhost -u root -ppass database --compatible=mysql40 | gzip > /database.sql.gz), but i don't have polish letters (instead polish letter was "?") - backup file already didn't have polish letters, so after import too.

So what i have to do, to create 100% good backup?
the option --compatible=mysql40 may break your charset.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
/var/lib/mysql contents - What to backup chakkerz Linux - General 3 05-25-2005 10:25 PM


All times are GMT -5. The time now is 09:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration