Skip to main content

mr resource version-restore

Restore a previous version to be the current version of a Resource. Creates a new version that is a copy of the target (the original target version is preserved). Both --resource-id and --version-id are required. The optional --comment annotates the restore for the audit trail.

Usage

mr resource version-restore

Examples

Restore with a comment

mr resource version-restore --resource-id 42 --version-id 17 --comment "revert bad edit"

Silent restore

mr resource version-restore --resource-id 42 --version-id 17

Flags

FlagTypeDefaultDescription
--resource-iduint0Resource ID (required) (required)
--version-iduint0Version ID (required) (required)
--commentstring``Restore comment

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)

Exit Codes

0 on success; 1 on any error

See Also