* use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the License for the specific language governing permissions and * limitations under the License. * * Author: Adam Venturella - aventurella@gmail.com * * @package Sample * @author Adam Venturella <*****@*****.**> * @copyright Copyright (C) 2009 Adam Venturella * @license http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 * **/ /** * Sample */ require 'couchdb/CouchDB.php'; $source_db = 'newdb1'; $target_db = 'newdb2'; $db = new CouchDB(); // assumes that both $source_db and $target_db exist // $source_db and $target_db can be local/local, remote/local, remote/remote, local/remote // see http://wiki.apache.org/couchdb/Replication for push vs pull replication. // hint: you want pull $db->replicate($source_db, $target_db);