Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the database file location for couchdb?

Tags:

couchdb

I've got couchdb installed from a package manager (Ubuntu, 10.04), but the partition where couchdb is installed is not especially big (~5GB). I'd like to move the database files to a bigger partition I set aside for the db, but I can't seem to find how to do it anywhere.

I suspect it's a local.ini tweak, but I've got nothing to back that up.

like image 992
FTWynn Avatar asked Jun 10 '11 01:06

FTWynn


People also ask

Where is CouchDB data stored?

Configuration Backups. CouchDB's configuration system stores data in . ini files under the configuration directory (by default, etc/ ). If changes are made to the configuration at runtime, the very last file in the configuration chain will be updated with the changes.

How does CouchDB store data?

CouchDB stores data as "documents", as one or more field/value pairs expressed as JSON. Field values can be simple things like strings, numbers, or dates; but ordered lists and associative arrays can also be used. Every document in a CouchDB database has a unique id and there is no required document schema.

Is CouchDB document database?

CouchDB is a document storage NoSQL database. It provides the facility of storing documents with unique names, and it also provides an API called RESTful HTTP API for reading and updating (add, edit, delete) database documents. In CouchDB, documents are the primary unit of data and they also include metadata.

How do I backup my CouchDB?

To back up CouchDB data, use CouchDB replication to back up the data to another CouchDB installation. You can choose between a normal replication in one-shot mode or continuous replications. Back up all CouchDB databases. Use CouchDB replication to recover the backup databases from the backup CouchDB instance.


2 Answers

That is in local.ini

[couchdb] database_dir = /path/to/the/databases view_index_dir = /path/to/the/views 

Good luck!

like image 178
JasonSmith Avatar answered Sep 19 '22 17:09

JasonSmith


You could also take advantage of symbolic linking. Move the contents of /var/lib/couchdb into your desired directory, and create a symbolic link. Be sure to give the couchdb user permissions to the symlink.

like image 29
Harlo Holmes Avatar answered Sep 19 '22 17:09

Harlo Holmes