Why is rm -r /opt/couchbase necessary during the Couchbase upgrade process?

Hello,

I’m following the Couchbase upgrade documentation for a full-capacity online upgrade, and I noticed that after running yum autoremove couchbase-server, the instructions suggest running rm -r /opt/couchbase.

I have a few questions about this step:

  1. Could you explain why rm -r /opt/couchbase is required as part of the upgrade process?
  2. In cases where the Data Storage Path is set to /opt/couchbase/var/lib/couchbase/data, wouldn’t this command risk permanently deleting important data files? Wouldn’t it be safer to retain this directory to avoid potential data loss?

It seems that preserving the data directory would be preferable to ensure that data is not accidentally lost. Is there a specific reason for removing the entire /opt/couchbase directory, or is there a recommended approach to protect data while following this upgrade procedure?

Thank you in advance for any insights or recommendations!

That is for the “swap node” which will initially have no data. Certainly DO NOT remove the directory of nodes that have data.

"A single, additional node is available; to act as a swap node. The node either has not previously run Couchbase Server, or has run a version that can, with all its configuration files and other data, be overwritten: therefore, the latest version of Couchbase Server will be installed on the node. (Prior to installation, if necessary, remove any old configuration files from /opt/couchbase, using the command rm -r /opt/couchbase.):

If there is data on the node, is it acceptable to remove the node first and then upgrade via yum update? Or should I run yum autoremove couchbase-server and then reinstall using yum install?

It seems that either would work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.