Skip to content

Instantly share code, notes, and snippets.

@ceremcem
Last active December 21, 2020 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceremcem/9d701cfd2de3bb90844cca463f7991b2 to your computer and use it in GitHub Desktop.
Save ceremcem/9d701cfd2de3bb90844cca463f7991b2 to your computer and use it in GitHub Desktop.
Checklist to create a new CouchDB backup server from scratch.
  1. Create a new LXC container:

     sudo lxc-create -n mycouch -t debian -B btrfs -- -r buster --packages nano sudo
    
  2. Setup CouchDB: https://docs.couchdb.org/en/stable/install/unix.html

  3. Set chattr +C for /var/lib/couchdb.

  4. Limit the LXC cpu usage. In mycouch/config:

    limits.cpu.allowance 20%
    
  5. Create a replication document to fetch mydb.

  6. Create the mydb/_security document.

  7. Create users in _users db.

  8. Build indexes (https://github.com/awilliams/couchdb-utils)

    ./couchdb-utils refreshviews mydb --host=admin:12345@10.0.8.86:5984 -v
    
  9. Remove the LXC cpu limit.

  10. Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment