vania-janet/multiturn-rag-retrieval-data huggingface dataset:
[Upload](https://cloud.ibm.com/docs/services/Cloudant?topic=Cloudant-document-versioning-and-mvccupload-the-new-revision-mvcc) the new revision.
4. [Delete](https://cloud.ibm.com/docs/services/Cloudant?topic=Cloudant-document-versioning-and-mvccdelete-old-revisions-mvcc) old revisions.



* Migration FAQ

 Migration FAQ 

Migrate your plan to an IBM® Cloudant® for IBM Cloud® Lite or Standard plan instance.



You can migrate to a Lite or Standard plan from one of the following plans:



* IBM Cloudant Enterprise
* Apache CouchDB



For more information, see [Migrating an Enterprise plan to a Lite or Standard plan](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-migrating-an-enterprise-plan-to-a-lite-or-standard-plan).

Or you can migrate from the Lite plan to a Standard plan, which is just upgrading from the Lite plan to the Standard plan. For more information, see [Migrating from a Lite plan to a Standard plan](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-migrating-from-a-lite-plan-to-a-standard-plan).





The IBM Cloudant team advises that you use the [couchbackup](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloudant-backup-and-recoveryibm-cloudant-backup-and-recovery) utility to export data to disk. Or use [IBM Cloud Object Storage](https://www.ibm.com/cloud/object-storage), which is an inexpensive, scalable solution for storing the exported files.





No, it's not possible to keep your domain. You must plan to update your applications to use the new account URL and credentials that are generated for the IBM Cloudant instances.
"by_status": "function(doc, req){if (doc.status = req.query.status){return false;} return true;}"
}
}
}
2. Create a design document in the database with the following filter function. Replace <database_name> with the name of your database and <file_path> with the file path of your design_doc.json. Invoke the write action to test creating a design document.<-- </ol> -->The following example shows the command syntax for this example. ibmcloud fn action invoke /_/myCloudant/write -p dbname <database_name> -p overwrite true -P <file_path>/design_doc.json
The following sample is an example command to write a design_doc.json file to a test database. ibmcloud fn action invoke /_/myCloudant/write -p dbname test -p overwrite true -P <file_path>/design_doc.json -r
The following example shows output from the previous command. {
"id": "_design/mailbox",
"ok": true,
"rev": "1-5c361ed5141bc7856d4d7c24e4daddfd"
}
For more information about IBM Cloudant design documents, see Design documents]] ! ! .<-- </section "id="section-cloudant_filter" "> --><-- <section "id="section-cloudant_seq" "> --> Processing an individual document by using an action sequence You can use an action sequence in a rule to fetch and process the document that is associated with an IBM Cloudant change event.Before you beginCreate a /whisk.system/cloudantpackage binding]] that is configured for your IBM Cloudant account.This example updates the document that was created in the Writing a document to an IBM Cloudant database]] ! ! ! ! ! ! ! ! ! ! !
Capturing and exporting a virtual machine (VM) 

You can capture and export an AIX or IBM i VM instance by using the Power Systems Virtual Server user interface or CLI. A VM is captured as a volume backed image. The image is stored in new volumes on the storage providers. An image can be exported to an IBM Cloud Object Storage (Cloud Object Storage) bucket. When an image is exported, the volumes of the image are copied and packaged in an Open Virtualization Appliance (OVA) file. The OVA file is compressed by using gzip before it gets uploaded to the IBM Cloud Object Storage bucket.

When you capture and export a VM, you can choose the image catalog, Cloud Object Storage, or both as destinations. The image catalog is on the IBM Power storage area network (SAN). IBM Cloud Object Storage is encrypted and dispersed across multiple geographic locations, and accessed over HTTP by using a REST API. This service uses the distributed storage technologies that are provided by the IBM Cloud Object Storage System (formerly Cleversafe). You can always export your image in your image catalog to Cloud Object Storage at a later point. You can also deploy the captured image to create a clone of the VM by using a different network configuration.

The IBM® Power® Systems Virtual Server Job feature tracks long-running asynchronous operations like VM capture, image export, and image import across multiple workspaces in your cloud account.

As part of this Job feature, new version of API and CLI enhancements are introduced for VM capture and image export operations. To view the new APIs, see the following:



* API for VM capture - [Capture a PVM instance and create a deployable image (version 2)](https://cloud.ibm.com/apidocs/power-cloudpcloud-v2-pvminstances-capture-post).
* API for image export - [Add image export job to the jobs queue (version 2)](https://cloud.ibm.com/apidocs/power-cloudpcloud-v2-images-export-post).
* --format: The format to use for the exported image. If the image is encrypted, only qcow2 is supported. One of: qcow2, vhd. (default: qcow2).
* --bucket: The Cloud Object Storage bucket to export the image to. The bucket must exist and an IAM service authorization must grant Image Service for VPC of VPC Infrastructure Services writer access to the bucket.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is image-export-job-update 

Update an image export job.

ibmcloud is image-export-job-update IMAGE JOB --name NAME [--output JSON] [-q, --quiet]



 Command examples 



* ibmcloud is image-export-job-update 72251a2e-d6c5-42b4-97b0-b5f8e8d1f479 6451a2e-d6c5-42b4-97b0-b5f8e8d1f479 --name my-image-export-job
* ibmcloud is image-export-job-update my-image my-export-job --name my-image-export-job







 Command options 



* IMAGE: ID or name of the image.
* JOB: ID or name of the image export job.
* --name: Name of the image export job.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is image-export-job-delete 

Delete one or more image export jobs.

ibmcloud is image-export-job-delete IMAGE (JOB1 JOB2 ...)
Multi-document fetching 

The following section covers a POST request to many documents from a database.

For a client application, this technique is more efficient than using multiple [GET](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-using-viewsquerying-a-view) API requests.

However, include_docs=true might require extra processing time when compared to accessing the view on its own.

The reason is that by using include_docs=true in a view query, all of the result documents must be retrieved to construct the response for the client application. In effect, a whole series of document GET requests are run, each of which competes for resources with other application requests.

One way to mitigate this effect is by retrieving results directly from the view index file. Omit include_docs=true to retrieve results directly from the view index file. Instead, in the map function in a design document, emit the fields that are required as the value for the view index.

For example, in your map function, you might use the following design specification:

function(user) {
if(user.email_verified === true) {
emit(user.email, {name: user.name, email_verified: user.email_verified, joined: user.joined});
}
}

See the example request that uses HTTP to obtain the full content of documents that match the listed keys within a partition:

POST $SERVICE_URL/$DATABASE/_partition/$PARTITION_KEY/_design/$DDOC/_view/$VIEW_NAME HTTP/1.1
Content-Type: application/json

{
"include_docs": true,
"keys" : [
"1000043",
"1000044"
]
}

See the example request to obtain the full content of documents that match the listed keys within the products partition:



* Curl
* Java
* Node
* Python
* Go



curl -X POST "$SERVICE_URL/products/_partition/small-appliances/_design/appliances/_view
[External link icon](https://cloud.ibm.com/docs-content/v1/content/ded4adc3ea0bd2a81b113c579f2b1183926da211/icons/launch-glyph.svg)](https://watson-developer-cloud.github.io/doc-tutorial-downloads/discovery/test-doc4.html).

In some browsers, the preceding links open in a new window. To save locally, select Save As in your browser's File menu to save a copy of the file.





 Step 4: Upload the documents 



1. Now, add the example documents to your collection. This example uploads the document test-doc1.html to your collection. Replace {apikey}, {url}, {environment_id} and {collection_id} with your information. Modify the location of the sample document to point to where you saved the test-doc1.html file.



* Use the POST /v1/environments/{environment_id}/collections/{collection_id}/documents method:

curl -X POST -u "apikey:{apikey}" -F "file=@test-doc1.html" "{url}/v1/environments/{environment_id}/collections/{collection_id}/documents?version=2019-04-30"

Alternatively, use one of the SDKs listed in the [API reference](https://cloud.ibm.com/apidocs/discovery):
* Java:

IamAuthenticator authenticator = new IamAuthenticator("{apikey}");
Discovery discovery = new Discovery("2019-04-30", authenticator);
discovery.setServiceUrl("{url}");

String environmentId = "{environment_id}";
String collectionId = "{collection_id}";
InputStream documentStream = new FileInputStream("./test-doc1.html");
[CloudVPC.svg](https://cloud.ibm.com/media/docs/images/homepage/CloudVPC.svg)](https://cloud.ibm.com/docs/vpc)[IBM Watson Assistant<br><br>Build your own branded live chatbot into any device, application, or channel.<br><br>![WatsonAssistant.svg](https://cloud.ibm.com/media/docs/images/homepage/WatsonAssistant.svg)](https://cloud.ibm.com/docs/watson-assistant)[Object Storage<br><br>Store encrypted and dispersed data across multiple geographic locations.<br><br>![IBM_CloudObjectStorage.svg](https://cloud.ibm.com/media/docs/images/homepage/IBM_CloudObjectStorage.svg)](https://cloud.ibm.com/docs/cloud-object-storage)[IBM Cloud platform<br><br>The platform is built to support your needs whether it's working only in the public cloud or taking advantage of a multicloud deployment model.<br><br>Show more<br><br>The platform is built to support your needs whether it's working only in the public cloud or taking advantage of a multicloud deployment model.<br><br>![ibm-cloud.svg](https://cloud.ibm.com/media/docs/images/homepage/ibm-cloud.svg)](https://cloud.ibm.com/docs/overview)[IBM Watson Speech to Text<br><br>Use Watson Speech to Text to transcribe spoken audio to written text.<br><br>![WatsonSpeechToText.svg](https://cloud.ibm.com/media/docs/images/homepage/WatsonSpeechToText.svg)](https://cloud.ibm.com/docs/speech-to-text)

 Find your solution 

Combine IBM Cloud products to solve key cloud business cases.
For more information, see [Creating a Linux custom image](https://cloud.ibm.com/docs/vpc?topic=vpc-create-linux-custom-image), [Creating a Windows custom image](https://cloud.ibm.com/docs/vpc?topic=vpc-create-windows-custom-image), [Bring your own license](https://cloud.ibm.com/docs/vpc?topic=vpc-byol-vpc-about) and [Uploading data](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-upload) to IBM Cloud Object Storage.
2. In [IBM Cloud console](https://cloud.ibm.com/login), go to Menu icon ![Menu icon](https://cloud.ibm.com/docs-content/v1/content/f02b9c9adcbb7328d95a45e105cec371d50f15eb/icons/icon_hamburger.svg) > VPC Infrastructure > Compute > Images.
3. On the Custom images tab, click Create.
4. Complete the fields that are described in Table 1 and click Create Custom Image.





Table 1. Import custom image user interface fields

 Field Value 

 Location Select the specific geographic area and region where you want your custom image to be available for provisioning. 
 Name A name is required for your custom image. 
 Resource group Select a resource group for the server. 
 Tags You can assign a label to this resource so that you can easily filter resources in your resource list. 
 Source Select Cloud Object Storage as the source. A list displays from which you select a IBM Cloud Object Storage service instance where the image that you want to import is stored. <br>Do you need to create a custom image from a volume instead? Select the source for the custom image by choosing either Virtual server instance boot volume or Block storage boot volume.
IBM Cloudant keeps a history of _id and _rev to enable replication, but not old document bodies.

IBM Cloudant doesn't expose the CouchDB compaction API.

IBM Cloudant doesn't guarantee that a database is compacted in a specific time. Compaction is done as a background process across the storage tier. Databases are always being compacted. It isn't guaranteed that the data compacted is the data that you deleted or changed.

IBM Cloudant is accepting the right to be forgotten requests through the [IBM Data Privacy Office (DPO)](https://w3.ibm.com/ibm/privacy/). When a right to be forgotten request is made from the IBM DPO, IBM Cloudant verifies the request, explicitly triggers database compaction, and verifies that compaction occurred. At the end of this process, the only version of the document is its tombstone ( _id, _rev, _deleted, and any fields your application includes there).





 Removal of tombstones 

IBM Cloudant can completely remove all references and data for a document when required. This task is an operator-managed process called purging. Before you request that documents be purged, it's important to understand that purged documents cannot be recovered by IBM Cloudant once the process is complete.

The CouchDB purge API is not supported by IBM Cloudant.

In the context of GDPR, purging is only required if PI is used in a document ID. It's a bad idea for an _id to store PI for lots of reasons, but a handful of semi-valid use cases exist (for example, a unique email). If possible, encrypt or pseudonymize data so it's opaque to IBM Cloudant.

If a document needs removal through a right to be forgotten request, follow these steps:



1. File a request with the [IBM DPO](https://w3-03.ibm.com/ibm/privacy/index.html) to request purging of specific document _id values along with the reason.
2. On receipt of a formal request by the IBM DPO, IBM Cloudant operations verifies the request to confirm the id contains PI.
It's important for IBM Cloudant databases to have concurrent read and write access. MVCC enables that capability. MVCC is a form of [optimistic concurrency control](https://en.wikipedia.org/wiki/Optimistic_concurrency_control) that makes read and write operations on IBM Cloudant databases faster because a database lock isn't necessary for read and write operations. At the same time, MVCC enables synchronization between IBM Cloudant database nodes.





You don't know. Sometimes you request a document that has a conflict. At those times, IBM Cloudant returns the document normally, as though no conflict exists. However, the version that is returned isn't necessarily the most current version. Instead, the version is selected based on an internal algorithm that considers multiple factors. You must not assume that when documents are returned they're always the most current.





If a conflict with a document exists and you try to update it, IBM Cloudant returns a 409 response. If you try to update a document while you're offline, IBM Cloudant can't check for potential conflicts, and you don't receive a 409 response.

When this situation happens, it's best to check for document conflicts when you're back online. If you need to find document conflicts, use the following example map function:

function (doc) {
if (doc._conflicts) {
emit(null, [doc._rev].concat(doc._conflicts));
}
}

If you want to find conflicts within multiple documents in a database, write a [view](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-views-mapreduce).





If you don't check for conflicts, or don't fix them, your IBM Cloudant database has the following problems:



* Document inconsistency increases because conflicting documents continue to multiply.
* Database size increases because documents with conflicts must be kept until the conflict is resolved.
* Performance degrades because it takes more work for IBM Cloudant to respond to each request since it has to go through all the conflicted documents to find the "best possible" version.
IBM Cloud Dedicated 

IBM® Cloudant® for IBM Cloud® for (IBM Cloud® Dedicated) is an optional add-on to an IBM Cloud Dedicated environment. The optional add-on for IBM Cloudant Dedicated in IBM Cloud Dedicated is priced based on the hardware capacity that is allocated to the environment. You can buy it by contacting your IBM® sales representative.

IBM Cloud Dedicated customers can also choose to use IBM Cloudant in IBM Cloud Public by using the syndicated catalog, including the Lite and Standard plan instances. IBM Cloud Dedicated users aren't eligible to buy the Dedicated Hardware plan from the IBM Cloud Public catalog. IBM Cloud Dedicated users must use IBM Cloudant Dedicated on IBM Cloud Dedicated if dedicated hardware is required.

The following screen capture shows where you select the Dedicated Hardware plan on the IBM Cloud Dashboard when you create a resource.

Zoom

![Select the IBM Cloudant Dedicated Hardware plan from the IBM Cloud Dashboard when you create a resource.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/images/ibmcloud_catalog.png)

Figure 1. IBM Cloudant Dedicated Hardware plan



 Hardware capacity 

IBM Cloudant within IBM Cloud Dedicated is purchased by using an IBM Cloud Dedicated IBM Cloudant 1.6 TB Capacity part, which includes a clustered IBM Cloudant environment that consists of three database nodes and two load balancers. Each database node includes 1.6 TB on SSDs, and since all data is stored in triplicate, this storage equates to 1.6 TB of unique disk space across the cluster. Expansion of an environment can be accomplished by buying more IBM Cloud Dedicated IBM Cloudant 1.6 TB Capacity parts, which can be used to expand the IBM Cloudant cluster in multiples of three database nodes. Customers can also choose to have multiple separate IBM Cloudant environments rather than expanding a single environment.





 Locations and tenancy in a Dedicated environment 

The IBM Cloudant Dedicated environment within an IBM Cloud Dedicated environment is on hardware that is designated for sole use by the IBM Cloud Dedicated customer.
"rev": "1-57a08e644ca8c1bb8d8931240427162e"
},
{
"ok": true,
"id": "doc2",
"rev": "1-bf51eef712165a9999a52a97e2209ac0"
},
{
"ok": true,
"id": "doc3",
"rev": "1-9c9f9b893fcdd1cbe09420bc4e62cc71"
},
{
"ok": true,
"id": "doc4",
"rev": "1-6aa4873443ddce569b27ab35d7bf78a2"
},
{
"ok": true,
"id": "doc5",
"rev": "1-d881d863052cd9681650773206c0d65a"
}
]
Show more







 Step 4: Setting an environment variable 

You can use environment variables or options to specify the URL and database for the CouchDB or IBM Cloudant instance that you want to work with CouchBackup.

In this tutorial, you set the COUCH_URL and specify the database by using the --db parameter.

Set the COUCH_URL environment variable to specify the URL for the CouchDB or IBM Cloudant instance.

export COUCH_URL=https://username:password@myhost.cloudant.com





 Step 5: Backing up a database 

The CouchBackup utility backs up your database to a text file to preserve your data and make it easier to restore.



1. Run the couchbackup command to direct the contents of your database to a text file.

couchbackup --db couchbackup-demo > couchbackup-demo-backup.txt
2. Review the results.
For more information about the format to use to specify the repository for your image, see the [ibmcloud ce app create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-create) command.
4. To confirm that you can access the referenced image, verify the location of your image and confirm that you have permissions to access the image.

If the image is located in a container image registry, such as Docker Hub or IBM Cloud Container Registry, check that you added registry access to Code Engine and that you are using the correct registry secret. For more information about working with images in a container image registry, see [adding access to a private container registry](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registry).
5. If you specify the --memory or --cpu option with the app create command, confirm that you are using valid values. In the following command, the values that are specified for --memory and --cpu are not valid; for example,

ibmcloud ce app create --name myapp --image icr.io/codeengine/codeengine --memory 50Gi --cpu 20

Example output

Creating application 'myapp'...
FAILED
memory parameter must be between 128Mi and 32Gi
cpu parameter must be between .01 and 8.0

To fix the errors, set the --memory option between 128 Mi and 32 Gi, and set the --cpu option between 0.01 and 8.0 vCPU.
6. If you receive an error message that indicates the resource quota is exceeded, delete apps or app revisions before you can deploy additional apps or app revisions.



* To manage your apps, use the [ibmcloud ce app list](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-list) command to display a list of all your apps in the current project.
couchbackup --url "$SERVICE_URL" --db animaldb > backup.txt

The [NPM readme file](https://github.com/cloudant/couchbackup/blob/master/README.md) details other options, including the ones in this list:



* Environment variables to set the names of the database and URL.
* Using a log file to record the progress of a backup.
* The ability to resume an interrupted backup.

This option is only available with the log file for the interrupted backup.
* Sending the backup text file to a named output file, rather than redirecting the stdout output.

The CouchBackup tools have [limitations](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloudant-backup-and-recoverylimitations).







 Restoring your IBM Cloudant data 

To restore your data, use the couchrestore tool. Use couchrestore to import the backup file into a new IBM Cloudant database. Then, ensure that you build all indexes before any application tries to use the restored data.

For example, to restore the data that was backed up in the earlier example:

couchrestore --url "https://myaccount.cloudant.com" --db newanimaldb < backup.txt

The [NPM readme file](https://github.com/cloudant/couchbackup/blob/master/README.md) provides details of other restore options.





 Limitations 

The CouchBackup tools have the following limitations:



* _security settings aren't backed up by the tools.
* Attachments aren't backed up by the tools.
* Backups aren't precise "point-in-time" snapshots. The reason is that the documents in the database are retrieved in batches, but other applications might be updating documents at the same time. Therefore, data in the database can change between the times when the first and last batches are read.