What I want is the ruby way to perform the following actions:
# dump database in SQL text format
echo .dump | sqlite3 mydb.sqlite3 > mydump.sql
# execute sql queries found on file mydump.sql to rebuild database
sqlite> .read mydump.sql
I want to perform the above actions through the SQLite3 API assuming that only the sqlite3-ruby gem and lib is available and not the command line util.
I read through the documentation here: http://www.rubydoc.info/github/luislavena/sqlite3-ruby/SQLite3/Database but I can't find the proper way to do it. Has anyone a clue on how to do it?