dbicx-backend-move - Cmdline tool around DBICx::Backend::Move
DBICx::Backend::Move
This is the command line tool for DBICx::Backend::Move. DBICx::Backend::Move allows you to to move your database from one backend to another. Imagine you have add your data in a MySQL database and want to continue with a PostgreSQL database. Here is the tool for you.
$ dbicx-backend-move --schema 'MyApp::Schema' --from_dsn dbi:mysql:dbname=mydb --from_user user --from_pass pass --to_dsn dbi::pg::dbname=mydb --to_user user --to_pass pass --verbose --rawmode
Lets look at the options in detail:
Required option. Name of the DBIx::Class based schema description of the source database. Therefore, it also will be the schema for the destination database.
Required option. This argument is the DSN to connect to the source database. It will be passed to DBIx::Class::Schema->connect. For more information see "connect_info" in DBIx::Class::Storage::DBI.
Required option. This argument is the DSN to connect to the destination database. It will be passed to DBIx::Class::Schema->connect. For more information see "connect_info" in DBIx::Class::Storage::DBI.
Optional option. This is the user name needed to connect to the source database. If the option is not given, dbicx-backend-move will try to determine it from the actual user. dbicx-backend-move without any options will show you a usage message that contains the user name it determined.
Optional option. This is the user name needed to connect to the destination database. If the option is not given, dbicx-backend-move will try to determine it from the actual user. dbicx-backend-move without any options will show you a usage message that contains the user name it determined.
Optional option. This is the password needed to connect to the source database. If this argument is not given dbicx-backend-move will assume no password is needed.
Optional option. This is the password needed to connect to the destination database. If this argument is not given dbicx-backend-move will assume no password is needed.
Optional option. Print the name of the table the tool is currently working on and a dot for every row.
Optional mode. Normally during a DB transfer we read and write values through the DBIC layers which can contain filters for deflate/inflate. This guarantees that possible backend-specific filters are applied and converted correctly. However, in some situation this can be too heavy (memory/time consuming) or you want the exact same values transferred without touching for other reasons. The rawmode does that.
Maik Hentsche, <Caldrin at cpan dot org>
<Caldrin at cpan dot org>
Please report any bugs or feature requests to bug-dbicx-migration at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBICx-Backend-Move. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dbicx-migration at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc DBICx::Backend::Move
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBICx-Backend-Move
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/DBICx-Backend-Move
CPAN Ratings
http://cpanratings.perl.org/d/DBICx-Backend-Move
Search CPAN
http://search.cpan.org/dist/DBICx-Backend-Move/
Thanks to
renormalist for discussinh design decisions
mst for explaining transaction handling in DBIC and DBI
Copyright 2012 Maik Hentsche.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install DBICx::Backend::Move, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBICx::Backend::Move
CPAN shell
perl -MCPAN -e shell install DBICx::Backend::Move
For more information on module installation, please visit the detailed CPAN module installation guide.