Tag Copier
License: PRO+ (Professional Edition or higher)
Plugin Type: Post-Index Plugin
Author: Diskover Data, Inc.
Overview
The Tag Copier post-index plugin preserves your valuable tag metadata when you re-index storage locations. Whether tags were applied manually by users or automatically through plugins like AutoTag, Tag Copier ensures this important classification data isn't lost during scheduled re-indexing operations.
When Diskover creates a new index for a storage location, any tags that existed in the previous index would normally be lost. Tag Copier solves this by migrating tags from the old (source) index to the new (target) index after indexing completes. The plugin intelligently merges tags, handles duplicates, and can exclude specific tags you don't want copied.
License Requirement: Professional Edition or higher
Use Cases
Preserving Manual Classifications: Your team has spent time manually tagging files for projects, reviews, or organizational purposes. When the storage location is re-indexed on a weekly or monthly schedule, Tag Copier ensures these manual classifications persist automatically.
Retaining Automated Tags: Plugins like AutoTag may have applied lifecycle tags, cost classifications, or workflow markers. Tag Copier preserves these tags across index rebuilds so your automated workflows continue uninterrupted.
Maintaining Workflow State: If you use tags to track data lifecycle stages (archive candidates, files pending deletion, items under review), Tag Copier keeps this workflow state intact when indices are refreshed.
Index-Time vs Post-Index Tag Copying
Diskover offers two approaches for preserving tags across re-indexes:
Approach |
When It Runs |
Best For |
|---|---|---|
Index-Time Plugin |
During the indexing scan |
Environments where tag preservation is always needed and configured in advance |
Post-Index Plugin (this guide) |
After indexing completes |
Situations where the index-time plugin wasn't configured, or when you need to run tag copying as a separate scheduled task |
The post-index Tag Copier plugin is particularly useful when you need to copy tags after the fact—perhaps the index-time plugin wasn't enabled during a re-index, or you prefer to run tag migration as a distinct workflow step for better control and visibility.
Installation
The Tag Copier plugin is included with Diskover Professional Edition and higher. The plugin files are located in the post-index plugins directory.
Prerequisites
Diskover core installation with plugin support
Python 3.9 or higher
Elasticsearch 7.x or 8.x (as supported by your Diskover installation)
Access to both source (old) and target (new) Elasticsearch indices
Verify Installation
Confirm the plugin files exist in your Diskover installation:
Linux:
ls -la /opt/diskover/plugins_postindex/diskover_tagcopier/
Windows:
dir "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\"
You should see:
diskover_tagcopier.py— The main plugin scriptREADME.md— Plugin documentation
Check Plugin Version
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py --version
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" --version
Configuration
Configuration is managed through the Diskover Admin Panel. Navigate to Plugins → Post Index → Tag Coier to access the settings.
Sample Configuraiton in Diskover Admin:
Here is the beginning of our sample configuration There are many other configuraitons for the Tag Copier plugin - covered in detail below!
Configuration Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
Integer |
4 |
Number of processing threads. Set to |
|
Boolean |
True |
Whether to copy tags from file documents. |
|
Boolean |
True |
Whether to copy tags from directory documents. |
|
List |
|
Specific tags to exclude from being copied to the target index. |
|
List |
|
Tags that identify documents to skip entirely during processing. |
Understanding Tag Exclusion Options
The plugin offers two different exclusion mechanisms:
exclude_tags: These specific tags will not be copied to the target index, but the document's other tags will still be processed. Use this when certain tags should not carry over (perhaps they're regenerated by other plugins during indexing).
exclude_autotags: Documents containing any of these tags are skipped entirely during the source index search. This improves performance by reducing the number of documents to process. Use this for tags that are automatically re-applied during indexing anyway.
Example Configurations
Default Configuration
Suitable for most environments where you want to preserve both file and directory tags:
High-Performance Configuration
For large indices with millions of documents, let the plugin auto-detect optimal thread count:
Files-Only Configuration
Copy tags only from file documents, skipping directory tags:
Execution
Tag Copier can be run manually from the command line or automated through Diskover's scheduling features.
Manual Execution
Basic Syntax
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py [OPTIONS] <source_index> <target_index>
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" [OPTIONS] <source_index> <target_index>
Command-Line Options
Option |
Description |
|---|---|
|
Automatically find the source index based on the target index's top paths |
|
Use a named configuration defined in the Admin Panel |
|
Enable detailed logging output |
|
Display the plugin version and exit |
Examples
Copy tags between two specific indices:
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py diskover-2024.12.01 diskover-2025.01.15
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" diskover-2024.12.01 diskover-2025.01.15
Auto-discover the source index:
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py -a diskover-2025.01.15
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" -a diskover-2025.01.15
Use a named configuration with verbose output:
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py -c high-performance -v diskover-old diskover-new
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" -c high-performance -v diskover-old diskover-new
Automated Execution
Tag Copier can be scheduled to run automatically after indexing completes:
Post-Crawl Command (Index Task)
Configure Tag Copier to run automatically after a specific Index Task completes. This is ideal when you want tag copying tied directly to a particular storage location's re-indexing schedule.
Linux Example:
Field |
Value |
|---|---|
Post-Crawl Command |
|
Post-Crawl Command Args |
|
Sample Post-Crawl Command configuraiton for Tag Copier executing with an Index Task:
In your system ensure to replace the ConfigurationName above with a named configuraiton that you’ve created at Diskover Admin → Plugins → Post-Index → Tag Copier – If you are not using a custom configuration and you’re just using Default than the -c flag and the ConfigurationName is not required!
Windows Example:
Field |
Value |
|---|---|
Post-Crawl Command |
|
Post-Crawl Command Args |
|
Available Index Task Tokens:
{indexname}— The name of the index that was just created
Using the -a flag with {indexname} allows the plugin to automatically discover the previous index for the same storage location.
Reviewing the Output
Console Output
During execution, Tag Copier provides progress information. With verbose mode (-v), you'll see detailed thread activity:
Starting diskover tag copier ... Finding previous index name... Found previous index diskover-2024.12.01 Finding and copying any tags in index diskover-2024.12.01 to index diskover-2025.01.15... searching for tags:* AND NOT tags:(autotag OR archive OR delete OR cleanlist) AND type:(file OR directory) in source index... thread 0 started searching for 500 docs in destination index... thread 1 started searching for 500 docs in destination index... thread 0 finished searching destination index in 2.3s thread 0 finished updating tags for 487 docs in 0.8s ... Finished searching source index and enqueueing 15234 docs in 45.2s Waiting for tag copy threads to finish... Finished tagging 14891 docs in 1m 23s
Key Log Messages
Message |
Meaning |
|---|---|
|
Plugin initialized successfully |
|
Auto-discovery located the source index (when using |
|
Processing complete — X documents had tags copied |
Log File Location
Tag Copier writes to the standard Diskover log location. Check your Diskover configuration for the log directory path.
Verifying Success
After Tag Copier completes, verify tags were copied by:
Opening Diskover search page (ensuring new index is refreshed and loaded)
Either search for tags or performing doc search that should result in files containing tag
Confirming the expected tags appear in the search results
Searching in Diskover
After running Tag Copier, you can search for tagged documents to verify the migration and work with your preserved tags.
Finding Tagged Documents
Search for all documents with any tags:
tags:*
Search for documents with a specific tag:
tags:project-alpha
Search for documents with workflow tags:
tags:(archive OR delete OR review)
Searching for specific tags using # search:
Verifying Tag Migration
To confirm tags were successfully copied, search for a specific file and check its tags:
name:important-report.xlsx AND tags:*
Find files in a specific location that have tags:
parent_path:/mnt/data/projects/* AND tags:*
Troubleshooting
No Tags Copied (0 Documents Tagged)
Possible Causes:
The source index has no tagged documents
All tagged documents match the
exclude_autotagsfilter and are being skippedDocuments exist in the source index but not in the target index (different storage paths)
Resolution:
Verify the source index contains tagged documents by searching
tags:*in that indexReview your
exclude_autotagsconfiguration—documents with any of these tags are skipped entirelyEnsure both indices cover the same storage locations
Index Not Found Error
Message: <index_name> no such index!
Resolution:
Verify the exact index name (case-sensitive)
Ensure the target index has finished populating before running Tag Copier
List available indices to confirm spelling: check Diskover's index selection dropdown
Auto-Index Discovery Fails
Message: No previous index found!
Resolution:
Ensure a previous index exists for the same storage location (same top paths)
Manually specify both source and target indices instead of using
-aVerify the previous index hasn't been deleted
Enabling Debug Logging
Run with verbose mode to see detailed processing information:
Linux:
python3 /opt/diskover/plugins_postindex/diskover_tagcopier/diskover_tagcopier.py -v <source_index> <target_index>
Windows:
python "C:\Program Files\Diskover\plugins_postindex\diskover_tagcopier\diskover_tagcopier.py" -v <source_index> <target_index>
Support
For additional assistance with the Tag Copier plugin:
Last Updated: April 2026
Comments
0 comments
Please sign in to leave a comment.