thelastpickle / cassandra-medusa

Apache Cassandra Backup and Restore Tool
Apache License 2.0
261 stars 141 forks source link

Add bucket-name cli argument for RO commands #589

Open azarnovdaniil opened 1 year ago

azarnovdaniil commented 1 year ago

Project board link

Hi!

Typical scenario - restoring one cluster to another. In this case, changing the backet_name in the config all time and reverting it is not convenient, as many manual operations and places for mistakes, and also a chance to start backup operation to another bucket(manually or cron).

It will be better to have arg with bucket-name for RO commands and use arg for the above scenario and one SA with RO access in all buckets because restoring is, most time, a manual operation.

┆Issue is synchronized with this Jira Story by Unito

adejanovski commented 1 year ago

I think that's a good idea. I had thought of it in the past as well. Now, do you think about going as far as specifying a secondary set of connection settings along with separate credentials? That could be challenging given how we handle connections in Medusa. Now, if it's just about specifying a different bucket name but reusing the same credentials, I guess that could be simpler (although we'd have to double check this).

If you feel like contributing this feature, it would be much appreciated :) I guess we'd need to see how this could be designed first though.

azarnovdaniil commented 1 year ago

@adejanovski Hi! Thanks for the answer. I made PR https://github.com/thelastpickle/cassandra-medusa/pull/590 with my implementation of this feature.

  1. Should we also configure prefixes from args?
  2. About keys, I think that we should not use separate keys here. General best practice for cloud - using SA attached to a host, without SA keys, and in this case, we cannot attach two SA.
adejanovski commented 1 year ago

oh, I couldn't see the linked PR from the ticket because of how the ticket was referred to in the description (see this).

I'll add the review to my todo list.

Should we also configure prefixes from args?

I think it would be nice indeed.

About keys, I think that we should not use separate keys here. General best practice for cloud - using SA attached to a host, without SA keys, and in this case, we cannot attach two SA.

I agree 👍

azarnovdaniil commented 1 year ago

@adejanovski

I think it would be nice indeed.

I added a configurable prefix.