Staging setup with couchdb

后端 未结 1 1623
一生所求
一生所求 2021-01-27 21:34

I have a production server running an app that uses CouchDB as its main database. I\'d like to set up a staging server that has a CouchDB instance that I can always sync back up

相关标签:
1条回答
  • 2021-01-27 22:36

    Your approach is what I would recommend. Copying DB and index files to a new name works as expected.

    Check /_config/couchdb for your values of database_dir and view_index_dir and then

    cd $database_dir
    cp live_replica.couch local_copy_to_mess_with.couch
    
    cd $view_index_dir # most likely the same dir
    cp -r .live_replica_design .local_copy_to_mess_with_design
    

    Make sure to run these commands as the owner of all the other files in these directories, e.g. couchbase, or else couchdb won't have the permissions to use the files you create. You can check correct owners and groups with ls -alR.

    0 讨论(0)
提交回复
热议问题