AnyEvent-CouchDB
view release on metacpan or search on metacpan
lib/AnyEvent/CouchDB.pm view on Meta::CPAN
This method requests that a C<$source> CouchDB database be replicated to a
C<$target> CouchDB database. To represent a local database, pass in just
the name of the database. To represent a remote database, pass in the
URL to that database. Note that both databases must already exist for
the replication to work. To create a continuous replication, set the
B<continuous> option to true.
B<Examples>:
# local to local
$couch->replicate('local_db', 'local_db_backup')->recv;
# local to remote
$couch->replicate('local_db', 'http://elsewhere/remote_db')->recv
# remote to local
$couch->replicate('http://elsewhere/remote_db', 'local_db')->recv
# local to remote with continuous replication
$couch->replicate('local_db', 'http://elsewhere/remote_db', {continuous => 1})->recv
( run in 1.627 second using v1.01-cache-2.11-cpan-49f99fa48dc )