AppSuite:Data management: Difference between revisions

From Open-Xchange
No edit summary
(Page moved to documentation.open-xchange.com)
Tag: Replaced
Line 2: Line 2:
== deleteinvisible ==
== deleteinvisible ==


The '''<code>deleteinvisible</code>''' command line tool can be used to remove not visible data inside a context. Before calling this CLT the module access for all users in the context should be changed to the according permissions. This CLT uses the changed permissions to determine what data is not visible for the context users anymore. Changing permissions can be done by either changing the module access for every single user in the context through the CLT changeuser or by the CLT for changing the module access for an entire context.
This article has been moved to [https://documentation.open-xchange.com/latest/middleware/components/commandlinetools/deleteinvisible.html documentation.open-xchange.com]
 
''Be careful because the deleted data is lost completely and can not be restored anymore.''
 
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text for this CLT
|-
| --environment
|Shows information about environment variables
|-
| --nonl
|Removes all newlines (\n) from output
|-
| --responsetimeout &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c,--contextid &lt;contextid&gt;
|The unique identifier of the context that invisible data should be deleted.
|-
| -N,--contextname &lt;contextname&gt;
|A name that is assigned to the context.
|}
 
Either the unique context identifier must be given or a name that is assigned to it.
 
 
=== Extra parameters ===
 
{| border="1"
|-
|-A,--adminuser &lt;adminuser&gt;
|Master adminstrator user name that is defined for managing contexts.
|-
|-P,--adminpass &lt;adminpass&gt;
|Master adminstrator user password.
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>(contextid or contextname) {adminuser adminpass}</code>'''
 
=== Command output ===
 
On success:
 
<code>context &lt;contextid or contextname&gt; invisible data deleted</code>
 
On failure:
 
<code>context &lt;contextid or contextname&gt; invisible data could not be deleted: &lt;reason from server&gt;</code>
 
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/deleteinvisible -N default</code>'''
 
<code>context default invisible data deleted</code>
 
== getpublication ==
{{VersionFrom|7.6.2}}
The '''<code>getpublication</code>''' command line tool can be used to list publications inside a context.
 
=== Usage ===
 
Usage: getpublication [-A <adminuser> -P <adminpass>] [ -c <contextid> [-u <publication-url>] | [-e <entity-id>] | [-i <userid> [-m <module>]]]
 
=== Parameters ===
{| border="1"
|-
| -h,--help
|Prints a help text for this CLT
|-
| --environment
|Shows information about environment variables
|-
| --nonl
|Removes all newlines (\n) from output
|-
| --responsetimeout &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c,--contextid &lt;contextid&gt;
|The unique identifier of the context that publications reside
|-
| -A,--adminuser &lt;adminuser&gt;
|The context's admin
|-
| -P,--adminpass &lt;adminpass&gt;
|The context's admin password
|-
| -u,--publication-url &lt;publication-url&gt;
|The publication URL
|-
| -m,--module &lt;module-name&gt;
|The module name
|-
| -e,--entity-id &lt;entity-id&gt;
|The entity's unique identifier
|-
| -i,--userid &lt;user-id&gt;
|The user's unique identifier
|}
 
=== Examples ===
 
Get information about a publication via the publication URL. There are two variations of a publication URL:
 
# <code>/publications/infostore/1/bar?secret=foo</code>
# <code>/publications/infostore/1/bar/123456789/current?secret=foo</code>
 
The first one describes a publication as a whole, and the second one a single element within a publication (Hint: 123456789 is the element's identifier)
 
With that in mind, information about a single publication via the URL can be retrieved with either one of those versions:
 
<code> $ getpublication -A oxadmin -P secret -c 1 -u /publications/infostore/1/bar?secret=foo</code>
 
OR
 
<code> $ getpublication -A oxadmin -P secret -c 1 -u /publications/infostore/1/bar/123456789/current?secret=foo</code>
 
<code>
publication Publication [userId=5, context=[
  id: 1
  idset: true
  readDatabaseset: false
  writeDatabaseset: false
  filestore_idset: false
  filestore_nameset: false
  average_sizeset: false
  maxQuotaset: false
  usedQuotaset: false
  maintenanceReasonset: false
  enabled: false
  enabledset: false
  nameset: false
  userAttribtuesset: false
  listrun: false
  quotas: []
], id=314, entityId=1337, module=infostore, description=Publication:, Context: 1, UserID:  5, ]
</code>
 
Single elements with in the publication can not be retrieved/listed (yet)
 
Get all publications for a single user with in the context, for all modules (or confine the output with just the desired module by using the -m <module-name> parameter).
 
<code> $ getpublication -A oxadmin -P secret -c 1 -i 5</code>
 
<code>
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| User ID | Context ID | Module    | Entity ID | ID  | URL                                            |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| 5      | 1          | infostore | 1337      | 314 | /publications/infostore/1/bar?secret=foo      |
| 5      | 1          | infostore | 1338      | 316 | /publications/infostore/1/mybar?secret=foo    |
| 5      | 1          | infostore | 1339      | 318 | /publications/infostore/1/oxfolder?secret=foo  |
| 5      | 1          | infostore | 1340      | 319 | /publications/infostore/1/whatever?secret=foo  |
| 5      | 1          | infostore | 1341      | 323 | /publications/infostore/1/raboof?secret=foo    |
| 5      | 1          | contacts  | 1453      | 319 | /publications/contacts/1/blacklist?secret=foo  |
| 5      | 1          | contacts  | 1821      | 324 | /publications/contacts/1/party?secret=foo      |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
</code>
 
Get all publications for all users in the context
 
<code> $ getpublication -A oxadmin -P secret -c 1</code>
 
<code>
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| User ID | Context ID | Module    | Entity ID | ID  | URL                                            |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| 4      | 1          | infostore | 32        | 490 | /publications/infostore/1/test1236?secret=bar  |
| 4      | 1          | infostore | 15        | 497 | /publications/infostore/1/bnbn?secret=bar      |
| 5      | 1          | infostore | 1337      | 314 | /publications/infostore/1/bar?secret=foo      |
| 5      | 1          | infostore | 1338      | 316 | /publications/infostore/1/mybar?secret=foo    |
| 5      | 1          | infostore | 1339      | 318 | /publications/infostore/1/oxfolder?secret=foo  |
| 5      | 1          | infostore | 1340      | 319 | /publications/infostore/1/whatever?secret=foo  |
| 5      | 1          | infostore | 1341      | 323 | /publications/infostore/1/raboof?secret=foo    |
| 5      | 1          | contacts  | 1453      | 319 | /publications/contacts/1/blacklist?secret=foo  |
| 5      | 1          | contacts  | 1821      | 324 | /publications/contacts/1/party?secret=foo      |
| 6      | 1          | infostore | 103359    | 114 | /publications/infostore/1/share?secret=barfoo  |
| 6      | 1          | infostore | 27698    | 115 | /publications/infostore/1/fld?secret=barfoo    |
| 6      | 1          | contacts  | 25337    | 889 | /publications/contacts/1/LinkedIn?secret=abc  |
| 6      | 1          | contacts  | 25337    | 890 | /publications/contacts/1/LinkedIn2?secret=def  |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
</code>
 
Get all publications with the specified entity identifier
 
<code> $ getpublication -A oxadmin -P secret -c 1 -e 25337</code>
 
<code>
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| User ID | Context ID | Module    | Entity ID | ID  | URL                                            |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| 6      | 1          | contacts  | 25337    | 889 | /publications/contacts/1/LinkedIn?secret=abc  |
| 6      | 1          | contacts  | 25337    | 890 | /publications/contacts/1/LinkedIn2?secret=def  |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
</code>
 
== deletepublication ==
{{VersionFrom|7.6.2}}
The '''<code>deletepublication</code>''' command line tool can be used to delete publications inside a context.
 
=== Usage ===
 
Usage: deletepublication [-f] [-A <adminuser> -P <adminpass>] [ -c <contextid> [-u <publication-url>] | [-e <entity-id>] | [-i <userid> [-m <module>]]] [-v]
 
=== Parameters ===
{| border="1"
|-
| -h,--help
|Prints a help text for this CLT
|-
| --environment
|Shows information about environment variables
|-
| --nonl
|Removes all newlines (\n) from output
|-
| --responsetimeout &lt;integer&gt;
|response timeout in seconds for reading response from the backend (default 0s; infinite) '''Available with v7.8.0'''
|-
| -c,--contextid &lt;contextid&gt;
|The unique identifier of the context that publications reside
|-
| -A,--adminuser &lt;adminuser&gt;
|The context's admin
|-
| -P,--adminpass &lt;adminpass&gt;
|The context's admin password
|-
| -u,--publication-url &lt;publication-url&gt;
|The publication URL
|-
| -m,--module &lt;module-name&gt;
|The module name
|-
| -e,--entity-id &lt;entity-id&gt;
|The entity's unique identifier
|-
| -i,--userid &lt;user-id&gt;
|The user's unique identifier
|-
| -f,--force
|Flag to force deletion
|-
| -v,--verbose
|Flag to enable printing verbose information about the publications that are deleted
|}
 
=== Examples ===
 
Delete a publication via the publication URL. As described in 'getpublication' there are two variations of a publication URL. Both variations can be used to delete a specific publication. Elements within the publication cannot be deleted. The extra flag '-f' must be specified in every delete operation, in order for the operation to execute. This is just a precaution, to inform the admin that the operation is irreversible and the publications subject to be removed, they will be lost completely and won't be able to restored anymore. So, the following invocation will yield:
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -u /publications/infostore/1/bar?secret=foo</code>
 
<code>No publication deleted yet. Please make sure that you want to continue with this irreversible operation. To force deletion use the '-f' flag.</code>
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -u /publications/infostore/1/bar?secret=foo -f</code>
 
<code>Publication with URL "/publications/infostore/1/bar?secret=foo" successfully deleted from context 1</code>
 
To retrieve more information about the publication subject to delete, use the '-v' flag:
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -u /publications/infostore/1/bar?secret=foo -f -v</code>
 
<code>
Publication with URL "/publications/infostore/1/bar?secret=foo" successfully deleted from context 1
publication Publication [userId=5, context=[
id: 1
idset: true
readDatabaseset: false
writeDatabaseset: false
filestore_idset: false
filestore_nameset: false
average_sizeset: false
maxQuotaset: false
usedQuotaset: false
maintenanceReasonset: false
enabled: false
enabledset: false
nameset: false
userAttribtuesset: false
listrun: false
quotas: []
], id=314, entityId=1337, module=infostore, description=Publication:, Context: 1, UserID:  5, ]
</code>
 
Delete all publications for a single user with in the context, for all modules (or confine the operation with just the desired module by using the -m <module-name> parameter).
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -i 5 -f</code>
 
<code>
The following publications were deleted: 314 316 138 319 323 319 324
</code>
 
Delete all publications for all users in the context
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -v -f</code>
 
<code>
The following publications were deleted: 490 497 314 316 138 319 323 319 324 114 115 889 890
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| User ID | Context ID | Module    | Entity ID | ID  | URL                                            |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| 4      | 1          | infostore | 32        | 490 | /publications/infostore/1/test1236?secret=bar  |
| 4      | 1          | infostore | 15        | 497 | /publications/infostore/1/bnbn?secret=bar      |
| 5      | 1          | infostore | 1337      | 314 | /publications/infostore/1/bar?secret=foo      |
| 5      | 1          | infostore | 1338      | 316 | /publications/infostore/1/mybar?secret=foo    |
| 5      | 1          | infostore | 1339      | 318 | /publications/infostore/1/oxfolder?secret=foo  |
| 5      | 1          | infostore | 1340      | 319 | /publications/infostore/1/whatever?secret=foo  |
| 5      | 1          | infostore | 1341      | 323 | /publications/infostore/1/raboof?secret=foo    |
| 5      | 1          | contacts  | 1453      | 319 | /publications/contacts/1/blacklist?secret=foo  |
| 5      | 1          | contacts  | 1821      | 324 | /publications/contacts/1/party?secret=foo      |
| 6      | 1          | infostore | 103359    | 114 | /publications/infostore/1/share?secret=barfoo  |
| 6      | 1          | infostore | 27698    | 115 | /publications/infostore/1/fld?secret=barfoo    |
| 6      | 1          | contacts  | 25337    | 889 | /publications/contacts/1/LinkedIn?secret=abc  |
| 6      | 1          | contacts  | 25337    | 890 | /publications/contacts/1/LinkedIn2?secret=def  |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
</code>
 
Delete all publications with the specified entity identifier
 
<code> $ deletepublication -A oxadmin -P secret -c 1 -e 25337 -f -v</code>
 
<code>
The following publications were deleted: 889 890
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| User ID | Context ID | Module    | Entity ID | ID  | URL                                            |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
| 6      | 1          | contacts  | 25337    | 889 | /publications/contacts/1/LinkedIn?secret=abc  |
| 6      | 1          | contacts  | 25337    | 890 | /publications/contacts/1/LinkedIn2?secret=def  |
+---------+------------+-----------+-----------+-----+------------------------------------------------+
</code>
 
 
[[Category: Administrator]]
 
[[Category: AppSuite]]
[[Category: AdminGuide]]
[[Category: CommandLineTools]]

Revision as of 13:47, 26 November 2018

deleteinvisible

This article has been moved to documentation.open-xchange.com