in reply to Re: Looking for module(s) that will backup mysql databases using DBI & DBD::mysql
in thread Looking for module(s) that will backup mysql databases using DBI & DBD::mysql

>and it can be run remotely.
really? on the docu page it sez:
but it can be run only on the same machine where the database director +ies are located.
..but maybe that meant the /target/ directories (backing up TO) - i don't know

at any rate - i don't see how this is any better than mysqldump which is what i've employed for this purpose in the past
http://dev.mysql.com/doc/mysql/en/mysqldump.html

but while he says he doesn't have shell or script access on the db machine, mysqldump can be run remotely (too?)

here's the command i use to backup my database:
mysqldump -acQ -h "$cfg{db_host}" -u "$cfg{db_user}" --password="$cfg{ +db_pass}" --add-drop-table --allow-keywords "$cfg{db_prod}" > $cfg{cg +i_root}/$cfg{backups}/$cfg{prod}_$block_date.sql
and here's the command i use in a "staging" script (ahem, a few lines below the above), to copy my beta database into the production database:
mysqldump -h "$cfg{db_host}" -u "$cfg{db_user}" --password="$cfg{db_pa +ss}" -acQ --add-drop-table --allow-keywords "$cfg{db_dev}" | mysql -s + -D "$cfg{db_prod}" -h "$cfg{db_host}" -u "$cfg{db_user}" --password= +"$cfg{db_pass}"
it should be noted too that i'm in an identical situation: $cfg{db_host} is a machine i don't have script or shell access on.

Replies are listed 'Best First'.
Re^3: Looking for module(s) that will backup mysql databases using DBI & DBD::mysql
by hubb0r (Pilgrim) on Aug 28, 2005 at 04:22 UTC
    you're right... you need local access to the machine to run the mysqlhotcopy script. It logs in to the mysql server and locks everything, then copies all of the relevant data files locally on the machine to somewhere else. It can transfer the data to some other machine, but you need to run mysqlhotcopy locally. Sorry for the confusion.