Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6209503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:59:46+00:00 2026-05-24T05:59:46+00:00

I have a production server running an app that uses CouchDB as its main

  • 0

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 to the production instance and get a clean copy.

A naive solution would be simply to have the staging server continuously replicate the production server’s database, and just use that. The problem of course is that in the course of testing on the staging server, I may do things that modify the database.

Functionally correct would be for me to delete the database every time and re-replicate from production; but obviously this would take a reeeeeeaaally long time if I had to start from scratch every time.

I’m looking for a solution something like: 1) Keep a pristine copy of the production db on the staging server, that is constantly reindexing its views 2) copy all the db files including the indexes to a db named something else 3) use that and blow it away when done.

Has anyone ever tried something like this and Does copying db files and renaming them even work smoothly? If so, what files do and don’t need to be copied?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:59:47+00:00Added an answer on May 24, 2026 at 5:59 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails app that is running on a production server with Apache
I already have a deploy.rb that can deploy my app on my production server.
I have a .NET 4.0 console application running on a production server. The app
I have a production server running with the following flag: - XX:+HeapDumpOnOutOfMemoryError Last night
I have this ASP.NET/SQLServer2005 website running on a production server (Win2003, QuadCore, 4GB). The
We have a production SQL Server 2005 database server with the production version of
I have ELMAH setup on my production server and it has done a fantastic
Let's say I have two database instances: InstanceA - Production server InstanceB - Test
We have a production web and database server with SQL Server 2000. (However, a
I have a Rails app installed on a Slicehost server running Apache 2 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.