Frends.Files.LocalBackup / 3.0.0
Summary
Copies files into a backup directory, optionally one subdirectory per run so successive runs do not overwrite each other, and can prune directories older than a given age.
Typical use — keeping a safety copy of what a Process consumed, with retention handled in the same step
Input parameters.
| Name | Type | Default | Example | Description |
|---|---|---|---|---|
| SourceDirectory | String |
– | c:\temp |
Source directory. |
| SourceFile | String |
– |
Literal/wildcard: test.txt, test*.txt, test?.txt, invoice(2024).pdf
Regex: <regex>test.(txt|xml), <regex>test.[^t][^x][^t], <regex>^(?!prof).*_test.txt
|
Source file. Supports wildcards (* and ?) and regular expressions.
Use |
| FilePaths | Object |
– | #trigger.data.filePaths |
The paths to the files to be backuped, mainly meant to be used with the file trigger with the syntax: #trigger.data.filePaths FilePaths will overwrite SourceDirectory and SourceFile parameters. |
| BackupDirectory | String |
– | c:\temp\backups, c:\temp\backups\ |
Destination directory where backup folder will be created. Backup directory's format if CreateSubdirectories=true: -. |
| CreateSubdirectories | Boolean |
True |
true |
Create a subdirectory into the given backup directory. |
| TaskExecutionId | String |
#process.executionid |
e7e34166-f4fd-45e5-9307-ea5c2cf8e037, foobar123 |
Enabled when (Create Subdirectories) is true. Value which is used in naming the backup directory. Can be any string but using task's execution id as default to avoid duplicate directory names. |
| Cleanup | Boolean |
– | false |
Cleanup older than folders from backup directory. If Create Subdirectories is false, individual files will also get cleaned. |
| DaysOlder | Int32 |
– | 30 |
Clean up backups older than given value in days. Enabled when is true. |