Hey David and Alexandre,

Actually, it is possible to define what secondary storage is targeted on a per-domain basis using the secondary storage selectors functionality. You can use the `createSecondaryStorageSelector` API to define a rule to redirect snapshots to a specific secondary storage depending on the domain. For instance:

```
(admin) 🐢 > create secondarystorageselector name="<name of the rule>" description="<description of the rule>" type=SNAPSHOT zoneid=<uuid of the zone> heuristicrule="if (account.domain.id === '<uuid of domain X>') { '<uuid of secondary storage A>' } else { '<uuid of secondary storage B>' }"
```

With this rule, snapshots taken at domain X will be copied to secondary storage A, and snapshots taken at other domains will be copied to secondary storage B.

It is not possible to redirect on a per-instance basis currently though, but the code can be easily extended to allow it. You can read more about this functionality, and about other currently available preset variables at [1].

[1]: https://docs.cloudstack.apache.org/en/4.20.0.0/adminguide/storage.html#direct-resources-to-a-specific-secondary-storage

Regards,
Fabricio

On 3/10/25 12:13, Alex Mattioli wrote:
Hi David,

Currently there isn’t a way to segregate secondary storages per domain.

What’s the use case there?

Alex.

________________________________
From: David Knuth <dkn...@ussignal.com.INVALID>
Sent: Monday, March 10, 2025 7:33:29 AM
To: users@cloudstack.apache.org <users@cloudstack.apache.org>
Subject: Apache Cloudstack question


Good morning!  I have what I hope is a quick and simple question. My company is 
working with Cloudstack and we're looking at some of the features called out in the 
documentation, such as the new B&R plugin, as well as the snapshot copy 
functionality as we are working on setting up a feasible disaster recovery solution 
for our clients.



We've looked into some of the options with snapshot copying and Linbit's DRBD 
solution for replication of snapshots/data, and I was curious about something.



In the documentation for snapshotting, it says that the snapshots are taken and 
then immediately copied off to secondary storage. Is it possible to define what 
secondary storage is targeted on a per-domain/instance basis for this? E.g., 
could we set up separate 'secondary storage' targets per customer domain, such 
that snapshots for one customer's domain remain separate from general 
storage/the rest of the customers?




[David 
Knuth]<https://www.bqignite.com/api/SignatureMetadata/GetRedirect?Guid=1e8fc43aed8e48428e08dd490aced0d4>

Reply via email to