title: CouchDB automatic archiving
body: <p>I have an angular application using local storage (PouchDB) which automatically sync with a CouchDB database on a remote server.</p>
  
  <p>As I would like to limit my application size, I would like to be able to archive automatically from CouchDB based on a condition.</p>
  
  <p>Here is what I've imagined:</p>
  
  <ul>
  <li>I save a file in my localDB which sync with my CouchDB</li>
  <li>After few days, I tell my localDB to archive this file</li>
  <li>My localDB delete the file and CouchDB automatically copy the file into another internal database (not sync'ed with the localDB) before removing it.</li>
  </ul>
  
  <p>You could say that I can do this within my app but the problem is when the app is used offline, it cannot directly access the remote CouchDB to copy into another database.</p>
  
  <p>So my question is, can CouchDB automatically copy a doc into another database (within same CouchDB) based on a value in the doc (archived = true for example)? If not, what would you suggest?</p>