# Replace Archived Files with a Custom Text File

Use the sReplaceStubWithText setting to replace archived files with a .txt file containing custom text.

This has the following advantages:

- No stubs/drivers/recall methods to manage

- Admins can set a custom string giving their users precise instructions

- Users can still search the original file system and see where their files were

- .txt files open in all operating system UIs and CLIs

- Users have clear instructions on where their file has gone and know exactly what to request from their admin.

Setting: sReplaceStubWithText

Value: Custom string to be used as the text file content.

## Behavior

1. This setting overrides the Replace the files with a stub setting configured on the archiving plan.

2. If the sReplaceStubWithText setting is present, either on the archiving server, or the access node, the original file will be replaced with a text file named `<filename>.cv-migrated.txt`.

   Example: A file named `testfile.pdf` is archived. The stub is named `testfile.pdf.cv-migrated.txt`.

3. If the setting value is empty, the stub file will contain the default text:

   This file has been archived by Commvault. Contact your backup admin to restore the file.

4. If the setting value is not empty, the contents of the text file will be set to the custom string specified in the registry key.

## During the Scan Phase

Files with the `.migrated.txt` extension will be excluded from backup to avoid backing up stub files.

## Restore Behavior

If a file named `<filename>.cv-migrated.txt` exists at the restore location, it will be deleted once the original file (`<filename>`) is successfully restored.

Example:

`testfile.pdf` is restored. After the restore operation completes, `testfile.pdf.cv-migrated.txt` is deleted.

## Archiving Support

- Local Archiving for Windows File System

- Network Share Archiving

×

Loading...