@adampetrovich/cvmove
v0.0.11
Published
Salesforce CLI plugin that assists with migrating ContentVersions between Salesforce organizations.
Maintainers
Readme
cvmove
Overview
cvmove is a Salesforce CLI plugin that migrates Files (ContentDocument and ContentVersion records) between Salesforce orgs while preserving their parent relationships.
Installation
sf plugins install @adampetrovich/cvmoveUsage
Migrate files between orgs
sf contentversion migrate --source-org my-src --target-org my-target [flags]Flags
--source-org(required): source Salesforce org alias or username.--target-org(required): target Salesforce org alias or username.--source-object: API name of the source object to migrate files from.--target-object: API name of the corresponding target object.--source-id-field: field on the source object used to identify records.--target-id-field: field on the target object used to match to source records.--source-where-filter: SOQLWHEREclause to filter source records.--downloads-path: local directory for temporary file storage.--no-save-locally: delete downloaded file (local) right after uploading to target orgs.--no-prompts: run the command in non-interactive mode.
Example
Migrate Account file attachments:
sf contentversion migrate \
--source-org my-prod \
--target-org target-prod \
--source-object Account \
--target-object Account \
--source-id-field Id \
--target-id-field External_Id__cContributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This plugin is licensed under the BSD 3-Clause License.
