Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MYSQL5 Backups

Status
Not open for further replies.

fzx5v0

IS-IT--Management
Jan 13, 2003
79
GB
Hi I have just tried to back up my databases using the command

mysqldump -u username -p database name > path to backup file

It has backed up all the table structures but not any of the data in the tables.

I am sure this worked ok in MYSQL 4

Can anyone advise
Thanks

Easyinkz Printer cartridges
 
how big are your tables, if very large, the dump is stored to memory before its written, which can cause odd behaviour.

For best results I always use mysqldump -u user -p database --quick

This makes mysql write each record, its very quick and causes not memory problems.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Hi thanks I tried that but have the same problem. I have just noticed this at the top of the output file

-- Server version 5.0.22

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


Easyinkz Printer cartridges
 
I have found on MYSQL site that there is a patch for this in the development section but it lookis quite complcated to install

I have now manged to export the tables using phpadmin so i have a backup now and I will wait for mysql to put the patch in the next release

Thanks

Easyinkz Printer cartridges
 
Has anyone ever had a problem with automated backups from MySQL Adinistrator? I set up an automated backup to run every night and it does not execute. I know I needed to store my username and password for the machine before it let me save the Automated backup plan. Is there a setting that I may be missing to allow automated backups or something?

Thanks
 
I still use mysqlhotcopy. It basically makes a copy of the tables from 1 database into another directory. I case of a disaster, I...
1. End mysql
2. delete the files in /var/lib/mysql/databasename
3. copy the tables from the backup directory to #2 location
4. chown mysql:mysql /var/lib/mysql/databasename/*
5. Start mysql

I use this daily to update the tables on my test box so I can work with updated data. My backups run every hour from 7:00am until 5:00pm. I take the 5:00 output tables, tar them and store them on another server which gets backed up to tape. I haven't had any troubles with it.

Mark
 
Yes, but I understand the mysqlhotcopy does not work well with InnoDB databases and tables, which is what I have set up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top