<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ACS 7.0.1 / ASS 2.0.2: Setting SOLR backup location is broken in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144362#M38322</link>
    <description>&lt;P class=""&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Configure the ASS backup location in our Alfresco setup, so that the SOLR backup is written to a persistent storage.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;ACS 7.0.1&lt;/P&gt;&lt;P class=""&gt;ASS 2.0.2&lt;/P&gt;&lt;P class=""&gt;AKS (Azure Kubernetes)&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Approach:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;I am using the documentation of ASS 2.0 to configure the backup location of the alfresco and archive core in&amp;nbsp;&lt;A href="https://docs.alfresco.com/search-services/latest/admin/" target="_self" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/search-services/latest/admin/&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;First problem I have is that I cannot see the backup location input fields in the admin console of the Alfresco repository.&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-mu7.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1486iB7114719F3368262/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;The builtin remote backup location should be set via admin console, but these fields are not available anymore in the admin console.&lt;/P&gt;&lt;P class=""&gt;The documentation shows following screenshot.&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-mux.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1488iC56128ED022893B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image" alt="Image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;So try these settings out via admin console does not work.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Second problem is that setting these values via alfresco-global.properties as mentioned in the guide does not work.This is my favorite approach as I do have all configuration outside the repository.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So it is mentioned to set the remoteBackupLocation(s) of both cores should be possible via alfresco-global.properties file which has been done this way:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;solr.backup.alfresco.remoteBackupLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/alfresco
solr.backup.archive.remoteBackupLocation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/archive&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The JMX dump of the running alfresco shows following entries:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Attribute Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attribute Value

$type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; solr

** Object Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Alfresco:Type=Configuration,Category=Search,id1=managed,id2=solr

** Object Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Search$managed$solr

instancePath&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [managed, solr]
search.solrShardRegistry.maxAllowedReplicaTxCountDifference 1000
search.solrShardRegistry.purgeOnInit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; false
search.solrShardRegistry.shardInstanceTimeoutInSeconds&amp;nbsp; &amp;nbsp; &amp;nbsp; 300
search.solrTrackingSupport.enabled&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; true
search.solrTrackingSupport.ignorePathsForSpecificAspects&amp;nbsp; &amp;nbsp; false
search.solrTrackingSupport.ignorePathsForSpecificTypes&amp;nbsp; &amp;nbsp; &amp;nbsp; false
solr.backup.alfresco.cronExpression &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0 2 * * ?
solr.backup.alfresco.numberToKeep &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
solr.backup.alfresco.remoteBackupLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/alfresco
solr.backup.archive.cronExpression&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0 4 * * ?
solr.backup.archive.numberToKeep&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
solr.backup.archive.remoteBackupLocation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/archive&lt;/PRE&gt;&lt;P class=""&gt;When using another cron expression (trigger every 5 minutes) to trigger the remote backup, the backup will not be created in this configured location.&lt;/P&gt;&lt;P class=""&gt;We have configured DEBUG log level for org.apache.solr.handler.SnapShooter via SOLR Admin console to see log output&lt;/P&gt;&lt;P class=""&gt;When the backup is triggered via ACS, we will see following entry in the log file of ASS.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Output ASS:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:16:08.943 INFO&amp;nbsp; (Thread-16) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot: &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Result:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;The location is wrong- it should be the remoteBackupLocation ”/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Next attempt is to use the mentioned backup command via url. So I tried to trigger the backup via GET to this url:&lt;/P&gt;&lt;PRE&gt;http://localhost:8983/solr/alfresco/replication?command=backup&amp;amp;location=&amp;amp;numberToKeep=4&amp;amp;wt=xml&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Output ASS:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:16:35.936 INFO&amp;nbsp; (Thread-17) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Triggering it works, but it still writes to the default location. It should be the value of remoteBackupLocation&amp;nbsp; for the alfresco core “/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Now I try to set the location via http parameter with an absolute path like mentioned in the documentation:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http://localhost:8983/solr/alfresco/replication?command=backup&amp;amp;location=/opt/alfresco-search-services/data/backup/alfresco&amp;amp;numberToKeep=4&amp;amp;wt=xml&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Output ASS:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:17:48.047 INFO&amp;nbsp; (Thread-18) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&amp;nbsp; &amp;nbsp;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Triggering the backup works, but it still writes to the default location.&lt;BR /&gt;It should be the given location parameter value “/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Deeper analysis:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;My analysis to the location parameter shows that setting this location parameter does not work anymore.&lt;BR /&gt;When using this endpoint in earlier versions, it was possible to trigger the backup with a specified location.&lt;/P&gt;&lt;P class=""&gt;There is a simple reason that it does not work anymore - Hyland has fixed a CVE and breaks the whole backup location functionality.&lt;/P&gt;&lt;P class=""&gt;Looking into ASS 2.0.2 container and inspect the file &lt;FONT face="courier new,courier"&gt;solrconfig.xml&lt;/FONT&gt; in &lt;FONT face="courier new,courier"&gt;/opt/alfresco-search-services/solrhome/templates/rerank/conf/&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;you will notice that the location parameter cannot be used anymore due to a mentioned CVE. It now can only be set via solr.backup.dir variable in ASS.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--
1181 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; This invariant is needed to prevent the usage of location parameter in the replication handler APIs.
1182 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; There is no validation for location parameter. This results in a vulnerability described in https://nvd.nist.gov/vuln/detail/CVE-2020-13941
1183 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; --&amp;gt;
1184 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;lst name="invariants"&amp;gt;
1185 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;str name="location"&amp;gt;${solr.backup.dir:.}&amp;lt;/str&amp;gt;
1186 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/lst&amp;gt;&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So I am trying to use&amp;nbsp; the solr.backup.dir value&amp;nbsp; in the file solrcore.properties in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/opt/alfresco-search-services/solrhome/templates/rerank/conf/&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;Oh, triggering a backup works now, but wait... We have two cores alfresco and archive. Setting the value in this file solrcore.properties which gets copied at the start of the container in both created cores, I cannot have two different locations for these cores anymore.&lt;/P&gt;&lt;P class=""&gt;The result is that snapshots are created in the same directory and I cannot&amp;nbsp;distinguish them anymore.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-n3z.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1487iD46AE6BC5980040B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;As we have immutable containers, the alfresco and archive core are recreated after each restart of the container and we cannot directly change the solr.backup.dir in each core this way.&lt;/P&gt;&lt;P class=""&gt;Can anybody confirm this behaviour? Is there any other workaround?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks&lt;/P&gt;&lt;P class=""&gt;Jens&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 14:43:58 GMT</pubDate>
    <dc:creator>jego</dc:creator>
    <dc:date>2022-04-01T14:43:58Z</dc:date>
    <item>
      <title>ACS 7.0.1 / ASS 2.0.2: Setting SOLR backup location is broken</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144362#M38322</link>
      <description>&lt;P class=""&gt;&lt;STRONG&gt;Goal:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Configure the ASS backup location in our Alfresco setup, so that the SOLR backup is written to a persistent storage.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;ACS 7.0.1&lt;/P&gt;&lt;P class=""&gt;ASS 2.0.2&lt;/P&gt;&lt;P class=""&gt;AKS (Azure Kubernetes)&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Approach:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;I am using the documentation of ASS 2.0 to configure the backup location of the alfresco and archive core in&amp;nbsp;&lt;A href="https://docs.alfresco.com/search-services/latest/admin/" target="_self" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/search-services/latest/admin/&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;Results:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;First problem I have is that I cannot see the backup location input fields in the admin console of the Alfresco repository.&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-mu7.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1486iB7114719F3368262/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;The builtin remote backup location should be set via admin console, but these fields are not available anymore in the admin console.&lt;/P&gt;&lt;P class=""&gt;The documentation shows following screenshot.&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-mux.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1488iC56128ED022893B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image" alt="Image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;So try these settings out via admin console does not work.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Second problem is that setting these values via alfresco-global.properties as mentioned in the guide does not work.This is my favorite approach as I do have all configuration outside the repository.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So it is mentioned to set the remoteBackupLocation(s) of both cores should be possible via alfresco-global.properties file which has been done this way:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;solr.backup.alfresco.remoteBackupLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/alfresco
solr.backup.archive.remoteBackupLocation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/archive&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The JMX dump of the running alfresco shows following entries:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Attribute Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attribute Value

$type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; solr

** Object Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Alfresco:Type=Configuration,Category=Search,id1=managed,id2=solr

** Object Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Search$managed$solr

instancePath&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [managed, solr]
search.solrShardRegistry.maxAllowedReplicaTxCountDifference 1000
search.solrShardRegistry.purgeOnInit&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; false
search.solrShardRegistry.shardInstanceTimeoutInSeconds&amp;nbsp; &amp;nbsp; &amp;nbsp; 300
search.solrTrackingSupport.enabled&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; true
search.solrTrackingSupport.ignorePathsForSpecificAspects&amp;nbsp; &amp;nbsp; false
search.solrTrackingSupport.ignorePathsForSpecificTypes&amp;nbsp; &amp;nbsp; &amp;nbsp; false
solr.backup.alfresco.cronExpression &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0 2 * * ?
solr.backup.alfresco.numberToKeep &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
solr.backup.alfresco.remoteBackupLocation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/alfresco
solr.backup.archive.cronExpression&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0 4 * * ?
solr.backup.archive.numberToKeep&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3
solr.backup.archive.remoteBackupLocation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/alfresco-search-services/data/backup/archive&lt;/PRE&gt;&lt;P class=""&gt;When using another cron expression (trigger every 5 minutes) to trigger the remote backup, the backup will not be created in this configured location.&lt;/P&gt;&lt;P class=""&gt;We have configured DEBUG log level for org.apache.solr.handler.SnapShooter via SOLR Admin console to see log output&lt;/P&gt;&lt;P class=""&gt;When the backup is triggered via ACS, we will see following entry in the log file of ASS.&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Output ASS:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:16:08.943 INFO&amp;nbsp; (Thread-16) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot: &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Result:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;The location is wrong- it should be the remoteBackupLocation ”/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Next attempt is to use the mentioned backup command via url. So I tried to trigger the backup via GET to this url:&lt;/P&gt;&lt;PRE&gt;http://localhost:8983/solr/alfresco/replication?command=backup&amp;amp;location=&amp;amp;numberToKeep=4&amp;amp;wt=xml&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Output ASS:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:16:35.936 INFO&amp;nbsp; (Thread-17) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Triggering it works, but it still writes to the default location. It should be the value of remoteBackupLocation&amp;nbsp; for the alfresco core “/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Now I try to set the location via http parameter with an absolute path like mentioned in the documentation:&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http://localhost:8983/solr/alfresco/replication?command=backup&amp;amp;location=/opt/alfresco-search-services/data/backup/alfresco&amp;amp;numberToKeep=4&amp;amp;wt=xml&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Output ASS:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;│ alfresco-search 2022-04-01 14:17:48.047 INFO&amp;nbsp; (Thread-18) [ &amp;nbsp; x:alfresco] o.a.s.h.SnapShooter Creating backup snapshot &amp;lt;not named&amp;gt; at file:///opt/alfresco-search-services/solrhome/alfresco/&amp;nbsp; &amp;nbsp;&lt;/PRE&gt;&lt;P class=""&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;Triggering the backup works, but it still writes to the default location.&lt;BR /&gt;It should be the given location parameter value “/opt/alfresco-search-services/data/backup/alfresco”&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Deeper analysis:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;My analysis to the location parameter shows that setting this location parameter does not work anymore.&lt;BR /&gt;When using this endpoint in earlier versions, it was possible to trigger the backup with a specified location.&lt;/P&gt;&lt;P class=""&gt;There is a simple reason that it does not work anymore - Hyland has fixed a CVE and breaks the whole backup location functionality.&lt;/P&gt;&lt;P class=""&gt;Looking into ASS 2.0.2 container and inspect the file &lt;FONT face="courier new,courier"&gt;solrconfig.xml&lt;/FONT&gt; in &lt;FONT face="courier new,courier"&gt;/opt/alfresco-search-services/solrhome/templates/rerank/conf/&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;you will notice that the location parameter cannot be used anymore due to a mentioned CVE. It now can only be set via solr.backup.dir variable in ASS.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--
1181 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; This invariant is needed to prevent the usage of location parameter in the replication handler APIs.
1182 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; There is no validation for location parameter. This results in a vulnerability described in https://nvd.nist.gov/vuln/detail/CVE-2020-13941
1183 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; --&amp;gt;
1184 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;lst name="invariants"&amp;gt;
1185 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;str name="location"&amp;gt;${solr.backup.dir:.}&amp;lt;/str&amp;gt;
1186 &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/lst&amp;gt;&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;So I am trying to use&amp;nbsp; the solr.backup.dir value&amp;nbsp; in the file solrcore.properties in&amp;nbsp;&lt;FONT face="courier new,courier"&gt;/opt/alfresco-search-services/solrhome/templates/rerank/conf/&lt;/FONT&gt;&lt;/P&gt;&lt;P class=""&gt;Oh, triggering a backup works now, but wait... We have two cores alfresco and archive. Setting the value in this file solrcore.properties which gets copied at the start of the container in both created cores, I cannot have two different locations for these cores anymore.&lt;/P&gt;&lt;P class=""&gt;The result is that snapshots are created in the same directory and I cannot&amp;nbsp;distinguish them anymore.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SCR-20220401-n3z.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1487iD46AE6BC5980040B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;As we have immutable containers, the alfresco and archive core are recreated after each restart of the container and we cannot directly change the solr.backup.dir in each core this way.&lt;/P&gt;&lt;P class=""&gt;Can anybody confirm this behaviour? Is there any other workaround?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks&lt;/P&gt;&lt;P class=""&gt;Jens&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 14:43:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144362#M38322</guid>
      <dc:creator>jego</dc:creator>
      <dc:date>2022-04-01T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: ACS 7.0.1 / ASS 2.0.2: Setting SOLR backup location is broken</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144363#M38323</link>
      <description>&lt;P&gt;Did you review &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-blog/search-services-2-0-2-release/ba-p/308070" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-blog/search-services-2-0-2-release/ba-p/308070&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;I guess this part may help you:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SEARCH-2995: Remove backup location in alfresco search service admin screen and SOLR REST API&lt;/EM&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Note that from Search Services 2.0.2 SOLR REST API for backup is not working anymore. It's required to configure the "solr.backup.dir" property in "solrcore.properties" file for SOLR Core. More details available in &lt;A href="https://github.com/Alfresco/InsightEngine/pull/1188/files" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/InsightEngine/pull/1188/files&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 02 Apr 2022 17:09:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144363#M38323</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2022-04-02T17:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACS 7.0.1 / ASS 2.0.2: Setting SOLR backup location is broken</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144364#M38324</link>
      <description>&lt;P&gt;Hi Angel,&lt;/P&gt;&lt;P&gt;thanks for the pointer.&lt;/P&gt;&lt;P&gt;It is nice that this is part of the release notes - mainly my source of truth is the official documentation. The official documentation still contains the old configuration and is not updated! IMHO, this must be part of a commit that the documentation is updated as well.&lt;/P&gt;&lt;P&gt;I have also tried the mentioned configuration to set the solr.backup.dir in solrcore.properties. It works technically, but you cannot set the backup dir independently for alfresco and archive core anymore when you use something like Kubernetes. The cores (alfresco and archive) needs to be created each time the Kubernetes pod is starting, so I have to set the backup dir in solrcore.properties in the templates directory. And this template file will get copied into both cores, so that we cannot distinguish between the backups when created.&lt;/P&gt;&lt;P&gt;I guess one way to restore the old configuration and have a solid security would be to allow to configure multiple allowed backup directories (solr.backup.dir.1 = ..., solr.backup.dir.2=..." in SOLR&amp;nbsp; and ACS / REST API can refer to these preconfigured directories.&lt;/P&gt;&lt;P&gt;The other way would be include the solr core name (alfresco + archive) into the backup snapshot name&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"snapshot.20220401112857454" will be changed to "snapshot-alfresco.20220401112857454"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or you simply create subfolders in the backup routine for each core - when using&amp;nbsp;&lt;/SPAN&gt;solr.backup.dir = /backup the snapshot for alfresco will be created in /backup/alfresco and for archive in /backup/archive.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Currently, ASS 2.0.2 in this situation breaks the functionality in my eyes.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;BR /&gt;Jens&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 09:11:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144364#M38324</guid>
      <dc:creator>jego</dc:creator>
      <dc:date>2022-04-04T09:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: ACS 7.0.1 / ASS 2.0.2: Setting SOLR backup location is broken</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144365#M38325</link>
      <description>&lt;P&gt;For me the follwing worked:&lt;/P&gt;&lt;P&gt;1) set&amp;nbsp;&lt;STRONG&gt;solr.backup.dir&lt;/STRONG&gt; in solr.in.sh&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2) update &lt;STRONG&gt;solrhome/templates/rerank/conf/solrconfig.xml&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;change&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;&amp;lt;str name="location"&amp;gt;${solr.backup.dir:.}&amp;lt;/str&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&amp;lt;str name="location"&amp;gt;${solr.backup.dir:.}/${data.dir.store:}&amp;lt;/str&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2023 12:45:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/acs-7-0-1-ass-2-0-2-setting-solr-backup-location-is-broken/m-p/144365#M38325</guid>
      <dc:creator>swagner</dc:creator>
      <dc:date>2023-02-08T12:45:48Z</dc:date>
    </item>
  </channel>
</rss>

