Skip to main content

mr group clone

Create a copy of an existing Group. The clone receives a new ID and GUID but inherits the source Group's Name, Description, URL, Meta, OwnerId, CategoryId, its tag associations, its many-to-many links to related Resources, Notes and Groups, and its typed group relations in both directions. What it does not copy is the owned side: child groups, owned resources and owned notes stay with the original. Use group export + group import for a deep subtree copy.

Usage

mr group clone <id>

Positional arguments:

  • <id>

Examples

Clone group 42

mr group clone 42

Clone and capture the new ID with jq

NEW=$(mr group clone 42 --json | jq -r '.ID')

Flags

This command has no local flags.

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Group object for the newly-created clone (new ID, new guid; copied Name, Description, Meta, owner/category references)

Exit Codes

0 on success; 1 on any error

See Also