Moving buckets between tenanted users
You can move buckets between one tenanted user and another.
Procedure
-
Link the bucket to a new user:
Syntax
radosgw-admin bucket link --bucket=CURRENT_TENANT/BUCKET --uid=NEW_TENANT$USERExample
[ceph: root@host01 /]# radosgw-admin bucket link --bucket=test/data --uid=test2$user2 -
Verify that the bucket has been linked to
user2successfully:[ceph: root@host01 /]# radosgw-admin bucket list --uid=test$user2 [ "data" ] -
Change the ownership of the bucket to the new user:
Syntax
radosgw-admin bucket chown --bucket=NEW_TENANT/BUCKET --uid=NEW_TENANT$USERExample
[ceph: root@host01 /]# radosgw-admin bucket chown --bucket='test2/data' --uid='test$tuser2' -
Verify that the ownership of the
databucket has been successfully changed by checking theownerline in the output of the following command:[ceph: root@host01 /]# radosgw-admin bucket list --bucket=test2/data