How to rename a CouchDB database?

Viewed 9532

I don't see an API for renaming a CouchDB database, or an option in Futon to do the same.

Short of replicating to another database and then deleting the original, is there a one-step way to rename a database?

4 Answers

I am using couchdb 2, i assume the previous answers are for an older version because the database files are not listed in the /var/lib/couchdb folder found using 'couch-config --db-dir' command.

the simplest way i am following is to use futon and replicate the db you want to rename to a new desired name then delete the old database.

Related