19070: Still trying to fix test_with_arvbox
[arvados.git] / doc / admin / reassign-ownership.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: "Reassign user data ownership"
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 If a user leaves an organization and stops using their Arvados account, it may be desirable to reassign the data owned by that user to another user to maintain easy access.
13
14 This is currently a command line based, admin-only feature.
15
16 h3. Step 1: Determine user uuids
17
18 User uuids can be determined by browsing workbench or using @arv user list@ at the command line.
19
20 The "old user" is the user that is leaving the organization.
21
22 The "new user" is the user that will gain ownership of the old user's data.  This includes collections, projects, container requests, workflows, and git repositories owned by the old user.  It also transfers any permissions granted to the old user, to the new user.
23
24 In the example below, @x1u39-tpzed-3kz0nwtjehhl0u4@ is the old user and @x1u39-tpzed-fr97h9t4m5jffxs@ is the new user.
25
26 h3. Step 2: Create a project
27
28 Create a project owned by the new user that will hold the data from the old user.
29
30 <pre>
31 $ arv --format=uuid group create --group '{"group_class": "project", "name": "Data from old user", "owner_uuid": "x1u39-tpzed-fr97h9t4m5jffxs"}'
32 x1u39-j7d0g-mczqiguhil13083
33 </pre>
34
35 h3. Step 3: Reassign data from the old user to the new user and project
36
37 The @user merge@ method reassigns data from the old user to the new user.
38
39 <pre>
40 $ arv user merge --old-user-uuid=x1u39-tpzed-3kz0nwtjehhl0u4 \
41   --new-user-uuid=x1u39-tpzed-fr97h9t4m5jffxs \
42   --new-owner-uuid=x1u39-j7d0g-mczqiguhil13083
43 </pre>
44
45 After reassigning data, use @unsetup@ to deactivate the old user's account.
46
47 <pre>
48 $ arv user unsetup --uuid=x1u39-tpzed-3kz0nwtjehhl0u4
49 </pre>
50
51 Note that authorization credentials (API tokens, ssh keys) are *not* transferred to the new user, as this would potentially give the old user access to the new user's account.