Using Macros within the destination path of the file transfer

aRoot support, support tips

EDpCloud automated file transfer and file replication macros

EDpCloud supports Macros within the file replication storepath. By using Macros you can create a dynamic or custom path for your file transfers. The store path will be generated automatically by expanding the macros and the replicated data will be stored in the resolved storepath.

The following are some examples of how to use the macros(Additional information can be found by reading eddist.cfg.html ).

Example of a site where content is aggregated in directories using the file sender’s IP

<config name=``simple'' password=``linkpassword'' ><link name="tokyo" >
<sender hostname="tokyo.enduradata.com" alias="*"/>
 <receiver hostname="london.enduradata.com"
        storepath="/home/reports/%ip%"
  />
</link>
</config>

The example above will put incoming data from host 192.168.100.12 under “/home/reports/192_168_100_12”

You can also break up the storage path into sub directories that include date elements such as the date, hour, minute etc.

Example of a site where content is aggregated by sender’s name and by day of the week and hour when data was received

<config name=``simple'' password=``linkpassword'' ><link name="tokyo" >
<sender hostname="tokyo.enduradata.com" alias="*"/>
 <receiver hostname="london.enduradata.com"
        storepath="/home/reports/%ip%/%weekday%/%hour%"
  />
</link>
</config>

In the second example, data transferred will be stored in directories that look like this:

/home/reports/192.168.100.1/monday/01
/home/reports/192.168.100.1/monday/23
/home/reports/192.168.100.1/friday/02

Then following macros are available at this time:

%ip%                   : Remote IP of the data sender

%hostname%      : Remote host name of the machine that is transferring data to the current receiver.

%loginname% :   The is the username of the user

%home% :          home directory of the user specified in %loginname%

%weekday%

%date%

%month%

%year%

%hour%

%minute%

%second%

Using one or more of these macros allows you to build the path dynamically and organize the files transferred to the remote geographic site when data is transferred.

Feel free to suggest additional macros that you find useful.

–eh

Using Macros within the destination path of the file transfer was last modified: April 2nd, 2018 by aRoot