This is what I do:
You would have to do this for each table in your database. I wrote a Perl script to do this automatically.Code:LOCK TABLES tablename WRITE; FLUSH TABLES tablename; BACKUP TABLE tablename TO 'backupfile'; UNLOCK TABLES;
Hello, need some simple advice, here is the thing:
I need to back up mysql database and I plane to do it in the following manner:
1. Dump the database into the file
2. scp it to the ssh sevrer (from here the existing backup software will pick it up)
The question is how do I dump mysql db to the file? (shoudl I stop mysql before dumping?)
Thanks,.
This is what I do:
You would have to do this for each table in your database. I wrote a Perl script to do this automatically.Code:LOCK TABLES tablename WRITE; FLUSH TABLES tablename; BACKUP TABLE tablename TO 'backupfile'; UNLOCK TABLES;
Is there an equivalent of database dump to file command?
(sorry, not really an mysql pro...)
Hi,
I went to Google and typed "backing up mysql".
This was one of the first results I received:
http://www.netadmintools.com/art39.html
[quote author=cloverm link=board=4;threadid=9557;start=0#msg87019 date=1090596187]
This is what I do:
You would have to do this for each table in your database. I wrote a Perl script to do this automatically.Code:LOCK TABLES tablename WRITE; FLUSH TABLES tablename; BACKUP TABLE tablename TO 'backupfile'; UNLOCK TABLES;
[/quote]
I thought mysql locked tables automatically, but I'm probably wrong.
I always use 'mysqldump' as trickster posted. Works flawlessly. You can even specify '--no-data' to leave that crap behind.![]()
[quote author=trickster link=board=4;threadid=9557;start=0#msg87255 date=1091012304]
Hi,
I went to Google and typed "backing up mysql".
This was one of the first results I received:
http://www.netadmintools.com/art39.html
[/quote]
Trickster, I usually don;t ignore/neglect google searches but in this particualr case I have no clue how the mysql thing works - hence I'd rather rely on the recomendations from the user who already did that ......after all I'm thining about mysql-based NetOffice into the enterprise, so I really need to know what I'm doing here.
P.S. I appreciate your polite way of saying 'BTFW man!'
;D
[quote author=praetorian link=board=4;threadid=9557;start=0#msg87273 date=1091027493]
I always use 'mysqldump' as trickster posted. Works flawlessly. You can even specify '--no-data' to leave that crap behind.
[/quote
Sorry, you're deaing with totalovercertified dummy here ;D
Which crap exactly will I leave behind if I specify --no-data?
Thanks.[/quote]
[quote author=elovkoff link=board=4;threadid=9557;start=0#msg87299 date=1091047771]
[quote author=trickster link=board=4;threadid=9557;start=0#msg87255 date=1091012304]
Hi,
I went to Google and typed "backing up mysql".
This was one of the first results I received:
http://www.netadmintools.com/art39.html
[/quote]
Trickster, I usually don;t ignore/neglect google searches but in this particualr case I have no clue how the mysql thing works - hence I'd rather rely on the recomendations from the user who already did that ......after all I'm thining about mysql-based NetOffice into the enterprise, so I really need to know what I'm doing here.
P.S. I appreciate your polite way of saying 'BTFW man!'
;D
[/quote]
I did not meant to be rude. :P
[quote author=elovkoff link=board=4;threadid=9557;start=0#msg87300 date=1091047919]
[quote author=praetorian link=board=4;threadid=9557;start=0#msg87273 date=1091027493]
I always use 'mysqldump' as trickster posted. Works flawlessly. You can even specify '--no-data' to leave that crap behind.
[/quote
Sorry, you're deaing with totalovercertified dummy here ;D
Which crap exactly will I leave behind if I specify --no-data?
Thanks.[/quote]
[/quote]
I *THINK* no data will just save the db structure, with no data.
Bookmarks