Using EDpCloud’s Macros For File Transfer and Directory Store Path

EDpCloud File Transfer Macros

EDpCloud supports Macros within the 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.

The following are some examples of how to use the macros(Additional information can be found by visiting: http://www.enduradata.com/pages/cross_platform_file_replication/html/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

 

Notice that the file synchronization will be accepted from all hosts (alias = “*”) and the storage path will include the IP, day of the week and the hour.

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s