Remove Host ArchiveLocations

This is a NuoDB Manager command. See NuoDB Manager.

Description

Remove all archive locations for any database on a given host. This command is similar to removing an archive for a database on a given host using remove database archiveLocation (see Remove Database Archive Location), except it removes all archives for any database on a given host.

Syntax

remove host archiveLocations stableId stableId

Parameters

Interactive Example

Show the current database configuration for database prod:

nuodb [test] > show database config
Database: prod
Config keys (optional):
Database: prod, ACTIVE, Status=RUNNING,  (v4)
  Variables: {REGION=us-west}
  Options: {mem=1g, ignoreUnreachableArchives=false}
  Default Options: { "commit": "${COMMIT:remote:1}","backoff.reqMinUptime":"30000","hostLimit":"${HOST_LIMIT:false}"}
  DB UUID: 5cb35f8a-48c0-e14c-b6b6-ff7b65fb7265
  Process group options:
  Process group tag constraints:
  Archive Locations:
    uuid:a01205b4-12b2-4188-883b-a9ba247d9250, requirements: SMs, region: us-west:
      archive: /var/opt/nuodb2/production-archives/prod
      journal-dir: /var/opt/nuodb2/production-archives/prod
    B1/127.0.0.1:48004, requirements: SMs, region: us-west:
      archive: /var/opt/nuodb1/production-archives/prod
      journal-dir: /var/opt/nuodb1/production-archives/prod
  

Remove the archive locations for host specified by uuid:a01205b4-12b2-4188-883b-a9ba247d9250:

nuodb [test] > remove host archiveLocations
Host stableId: uuid:a01205b4-12b2-4188-883b-a9ba247d9250 
[prod:/var/opt/nuodb2/production-archives/prod]

Try to remove the archive locations for a host that exists:

nuodb [test] > remove host archiveLocations
Host stableId: uuid:7d257aa1-d575-42f8-8c6a-0e2b83d058ca
Peer [Peer B1:48004 (local)] with id=[uuid:7d257aa1-d575-42f8-8c6a-0e2b83d058ca] exists; cannot not remove host archiveLocations

Scripting Example

The same remove host archiveLocatoins command can be executed with --command as follows:

nuodbmgr --broker host --password password \
    --command "remove host archiveLocations stableId uuid:7d257aa1-d575-42f8-8c6a-0e2b83d058ca"