I wish to perform a database dump through Ruby scripting, however i did not find any class or script for do this.
Ideally the dump should work with MySQL, PostgreSQL, SQLite, etc. (a minimum of MySql and Pg). I attempted with DBI however i can't.
Other does table for table ... D:
Edit 1: It's just for backup, no restore. For the time being I've troubles with hostings, because I have to request for permits to my IP, and so i will attempt with SSH.
What about using professional inside your script to operate the mysqldump application?
exec 'mysqlinstalldir/bin/mysqldump -u username -ppassword --databases databasename'
You need to have the ability to perform the same goes with Postgresql and pg_dump
you should use the body tools to take dump of database,run this script inside your code might be a rake task
system "mysqldump database_name table1 table2 -u root -p password > path/to/dump/file "