Moving buckets between non-tenanted users
The radosgw-admin bucket chown command provides the ability to change the ownership of buckets and all objects they contain from one user to another.
To move buckets between non-tenant users, unlink a bucket from the current user, link it to a new user, and change the ownership of the bucket to the new user.
Procedure
-
Link the bucket to a new user:
Syntax
radosgw-admin bucket link --uid=USER --bucket=BUCKETExample
[ceph: root@host01 /]# radosgw-admin bucket link --uid=user2 --bucket=data -
Verify that the bucket has been linked to
user2successfully:Example
[ceph: root@host01 /]# radosgw-admin bucket list --uid=user2 [ "data" ] -
Change the ownership of the bucket to the new user:
Syntax
radosgw-admin bucket chown --uid=user --bucket=bucketExample
[ceph: root@host01 /]# radosgw-admin bucket chown --uid=user2 --bucket=data -
Verify that the ownership of the
databucket has been successfully changed by checking theownerline in the output of the following command:Example
[ceph: root@host01 /]# radosgw-admin bucket list --bucket=data