LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup /var/lib/mysql are good idea? (https://www.linuxquestions.org/questions/linux-newbie-8/backup-var-lib-mysql-are-good-idea-801075/)

bigmen 04-09-2010 12:30 PM

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.

troop 04-09-2010 01:59 PM

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

bigmen 04-09-2010 02:48 PM

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?

cola 04-09-2010 06:34 PM

Quote:

Originally Posted by bigmen (Post 3930249)
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.

troop 04-09-2010 09:20 PM

Quote:

Originally Posted by bigmen (Post 3930249)
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.


All times are GMT -5. The time now is 12:39 AM.