| Applies to: This procedure has been confirmed against installations running Solr on DocuShare 7.5, 7.6, and 7.7. It also applies to DocuShare 8.0 and 8.1 (when released), which use the same Solr Collections API. This is performed using the command URL directly in a browser, or with curl, locally on the server. |
When to Use This Procedure
Use this Collections API method as a general-purpose, ad hoc backup and restore of the entire DocuShare Solr collection. Typical situations include:
- Taking a manual, one-time backup of the Solr index before a risky configuration change or a manual reindex.
- Creating a periodic or on-demand safety copy of the index outside of a normal maintenance window.
- Restoring a previously taken Collections API backup after an index problem, without needing to stop Solr or DocuShare.
| Not for scheduled file-level backups: If your backup strategy relies on operating system snapshots or scheduled file-level backups instead, use the separate procedure in "How to Back Up and Restore Solr Using Snapshots or Scheduled Operating System Backups," which documents the file-copy and Replication API methods. |
| Upgrading DocuShare and want to avoid a full re-index: If your goal is specifically to preserve the existing Solr index across a DocuShare version upgrade so you do not have to re-index the entire site afterward, use the dedicated upgrade procedure instead. It uses these same Collections API commands but adds the extra safety steps required during an upgrade window (moving the backup outside the DocuShare home directory and checking cluster status before restoring). See the "Solr Search During a DocuShare 8.0 Upgrade" article for that procedure. |
Before You Begin
- Solr must be running. These are HTTP requests sent to the running Solr admin API; do not stop Solr or DocuShare to perform this procedure.
- Confirm the DocuShare home directory path, referred to below as <dshome>.
- This does not replace a complete backup of the DocuShare database, document repository, configuration, and license information. Maintain those backups separately.
Backup
- Create a Solr_bak folder under <dshome>\Solr\server\solr\ before running the backup command below. Multiple backup folders may be created if needed, for example Solr_bak2, Solr_bak3, Solr_bak4.
Backup command:
| http://localhost:8983/solr/admin/collections?action=BACKUP&name=DocuShare_backup&collection=DocuShare&location=C:\Xerox\Docushare\Solr\server\solr\Solr_bak |
The name parameter is the name given to the backup. The location parameter is the path where the backup will be created; it must reside under <dshome>\Solr\server\solr\ and must already exist before the command is run.
| Move the backup to a safe location: After the backup completes, move the Solr_bak folder outside of <dshome> (or outside the DocuShare installation folder entirely) and keep it there until you are ready to restore. Leaving the backup inside the DocuShare folder tree risks it being overwritten, deleted, or excluded if that folder is later replaced, reinstalled, or cleaned up. |
| Optional status check: You can confirm the collection state at any time with a Cluster Status request. This is useful to run after a backup or before a restore to verify the collection is healthy: http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS&collection=DocuShare |
Restore
- Move the Solr_bak folder back to <dshome>\Solr\server\solr\ if it was relocated after backup.
- Run the restore command below.
| http://localhost:8983/solr/admin/collections?action=RESTORE&name=DocuShare_backup&collection=DocuShare&location=C:\Xerox\Docushare\Solr\server\solr\Solr_bak |
The name and location parameters must match the values used when the backup was created.
Alternative Backup and Restore Method
Solr can also be backed up and restored per shard using the Replication API. See "How to Backup and Restore Solr (by shard name)" for that procedure.
Support Guidance
If a backup or restore request fails, do not repeatedly retry it. Preserve the request URL, the response, Solr logs, and your DocuShare version and patch level, then contact Xerox DocuShare Support.
- DocuShare version and patch level, operating system, and installation type.
- The exact backup or restore command URL used, including name and location parameters.
- Whether the backup folder was moved outside <dshome> and when.
- Relevant Solr and DocuShare logs covering the time of the operation.