but when i am doing the same using a rails application i.e is thru web
i am unable to backup the database.The page is hanging up with out any
response.
My development environment is windows ,is this creating any problem
when i see the taskmanager-processes the mysqldump process is still
executing
while in IRB the mysql process is stoping as soon as the backup
operation is complete
am i missing out some thing that i need to do in rails
This might be off-topic, but... Why would you create a dump of your
database through a web request? Maybe use the request to tell the system
to start a certain rake task, that, for example, dumps, compresses and
packages up with the rest of your files, and places it somewhere ready
to download, maybe behind some authorization system, firing an email at
you when done.
I'd say, it's a much cleaner approach than maybe having the request
return a gziped dump directly.
Though I'm no ruby-master (pretty much on the other side of the gauge),
so I'd have no clue how to build such a rake task. This is just an
application design theory.
This is nothing to do with rails and everything to with mysql.To take a consistent dump with mysqldump you need to lock the db, which stops any other writes.
Options:
-have a master & a slave and take database dumps off the slave
-use something like innodb hot backup (MySQL)
-use lvm snapshotting.
- perhaps others - I'm not expert.