Moshe

An indirect way to do this could be to take backup of this collection and then 
restore with the desired placement rules.

Backup: 
        Example: curl “https://solr.foo.com/solr/admin/collections? 
<http://solr.foo.com/solr/admin/collections?action=RESTORE&name=backup_name&collection=targetcollection&repository=hdfsBackupRepository&async=restore-demo&replicationFactor=3&maxShardsPerNode=3&rule=shard>action=backup&name=backup_name&collection=source_collection&repository=hdfsBackupRepository&async=b1
 
<https://solr-ulsearch-serving.ms05.siri.apple.com/solr/admin/collections?action=backup&name=seed_template&collection=seed_backup_template&repository=hdfsBackupRepository&async=b1>
        Ref: 
https://lucene.apache.org/solr/guide/8_8/collection-management.html#backup 
<https://lucene.apache.org/solr/guide/8_8/collection-management.html#backup>


Restore with rules:

                Example: curl  
“https://solr.foo.com/solr/admin/collections?action=RESTORE&name=backup_name&collection=targetcollection&repository=hdfsBackupRepository&async=restore-demo&replicationFactor=3&maxShardsPerNode=3&rule=shard:*,replica:
 
<https://solr.foo.com/solr/admin/collections?action=RESTORE&name=backup_name&collection=targetcollection&repository=hdfsBackupRepository&async=restore-demo&replicationFactor=3&maxShardsPerNode=3&rule=shard:*,replica:>
       
<2,node:*&rule=replica:*,cores:<3~&rule=sysprop.PLATFORM_RACK:*,replica:<3”

                Ref: 
https://lucene.apache.org/solr/guide/8_8/collection-management.html#restore 
<https://lucene.apache.org/solr/guide/8_8/collection-management.html#restore>


Hope this helps and gives u a way forward.

Thanks
Aroop


> On Feb 10, 2021, at 2:23 PM, Ilan Ginzburg <ilans...@gmail.com> wrote:
> 
> Do you look for something that would move existing collection replicas
> to comply with a new set of rules?
> I'm afraid that doesn't exist, but you can use the Collection API to
> move replicas "manually".
> 
> Ilan
> 
> On Tue, Feb 9, 2021 at 1:10 PM mosheB <moshe...@mail.com> wrote:
>> 
>> Hi community,
>> Using Solr 8.3, is there any way to change the replica placment of "running"
>> collection say "from this point forward" or should I recreate the collection
>> and migrate all my data from the existing collection to the new one?
>> Tried to use the COLLECTIONPROP action which doesn't do the job, instead it
>> just update collectionprops.json file and not really affect the replica
>> placement enforcement.
>> 
>> Thanks!
>> 
>> 
>> 
>> --
>> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to