Copy
Introduction
The copy task is a functionality that allows you to duplicate or replicate data from one source location to a target destination. It serves the purpose of creating an exact copy of the data, ensuring its availability and integrity in multiple locations. In order for Copy task to work, a configured remote agent is necessary.
When you initiate a copy task, you specify the source location or file that contains the data you want to duplicate, as well as the destination where you want the copy to be placed. The copy operation ensures that the data from the source is replicated accurately to the target location, preserving the file structure, content, and metadata.
The copy task can be used in various scenarios, such as:
Backup and Recovery:
Creating backup copies of important data to protect against data loss or system failures. This ensures that a copy of the data is readily available for restoration purposes.
Data Distribution:
Replicating data across different locations or systems to enable data sharing, collaboration, or distribution. It allows multiple users or applications to access and work with the same data without interfering with the original source.
Data Migration:
Transferring data from one storage system to another or from one format to another. This can be useful when upgrading or transitioning to a new system or when consolidating data from multiple sources.
Redundancy and High Availability:
Creating redundant copies of critical data to ensure continuous availability and minimize downtime. This is often done in systems where data integrity and uninterrupted access are crucial.
Configuration
Name
- The display name of the task.Connector
- Previosly configured remote agent connector.Copy from
- Directory from where the copying will be performed.File name/pattern
- Pattern to move the files by.Recursive
- Move the data recursively one by one.Keep path
- Keeps the copied file's directory structure.Only first match
- Moves only the first matched file.Overwrite if exists
- Files with the same name will be replaced.Copy to
- Destination where the file will be copied to.Log on complete
- Prints the response in the business log.Response
- Contains a message about the move task result.
Example
We will copy the content from the rootdir to rootcopy, and showcase some of the scenarios and interactions. Let's assume that we have a following structure:
├── rootcopy
├── rootdir
├── hello.txt
├── sub1
├── hello123.txt
└── hello456.png
└── sub2
└── sub3
└── hi789.txt
To copy a whole folder, set up the task like this:
From
- rootdirTo
- rootcopyRecursive
- TruePattern
- No effectKeepPath
- TrueOnlyFirstMatch
- False
rootdir
will be copied recursively including the starting directory to the rootcopy
. As a result you will end up with the following directory structure:
To copy the folder content only, set up the task like this:
From
- rootdir/*To
- rootcopyRecursive
- TruePattern
-KeepPath
- TrueOnlyFirstMatch
- False
rootdir
content will be copied recursively without the paren folder. As a result you will end up with the following directory structure:
To copy the content from a folder, but only targeting the first file, set up the task like this:
From
- rootdir/*To
- rootcopyRecursive
- FalsePattern
-KeepPath
- TrueOnlyFirstMatch
- False
rootdir
content will be copied non-recursively, which results in only the first element being copied to the rootcopy
. As a result you will end up with the following directory structure:
To copy the content from a folder by using a ceratin pattern, set up the task like this:
From
- rootdir/*To
- rootcopyRecursive
- TruePattern
- .*.txtKeepPath
- TrueOnlyFirstMatch
- False
rootdir
content will be copied recursively adheering to the given pattern to rootcopy
. As a result you will end up with the following directory structure:
To copy the content from a folder without keeping the original path, set up the task like this:
From
- rootdir/*To
- rootcopyRecursive
- TruePattern
- helloKeepPath
- FaseOnlyFirstMatch
- False
rootdir
content will be copied recursively adheering to the given pattern but without keeping the path to rootcopy
. As a result you will end up with the following directory structure:
To copy the content from a folder without keeping the original path, set up the task like this:
From
- rootdir/*To
- rootcopyRecursive
- TruePattern
- helloKeepPath
- FaseOnlyFirstMatch
- False
rootdir
content will be copied recursively adheering to the given pattern but without keeping the path to rootcopy
. As a result you will end up with the following directory structure: