News

News

GAMMA t24 management configurations

Moving files to and from a remote server using GAMMA commands

So, what happens when you need to move a file or several files between a remote server and a local server (your T24 Application Server, for instance)? Maybe not even once, but repeatedly? Don’t worry, GAMMA commands have you back, as usual. Let’s see what you need to do.

GAMMA commands made easy

In GAMMA’s 2.5 makeover, we’ve changed our Enterprise Level Scheduler and created handy templates for the commands that our clients frequently use. This means that GAMMA Controller Commands (GCCs) now can be accessed and customized via the GAMMA User Interface, which, in turn, saves you (most of) the effort of tinkering in the Command Prompt.

There is, of course, a command template for moving files from to and from remote servers. To see how to tailor it to your needs, simply follow this step-by-step guide.

Create your controller command

First of all, navigate to GAMMA Admin / Global configurations / Controller Commands in the GAMMA menu.

GAMMA commands step by step 1

Click Add in the top left menu and select the SFTP.FILE template from the popup list and click OK to add it to your Controller Commands, so you can start customizing it.

GAMMA commands step by step 2

The new command will appear in blue in the left-hand list, with a [new] tag.  Click on it, and proceed as follows.

GAMMA commands step by step 3

The Header with the Name and Description is quite straightforward, just make sure that the Name you choose is unique on the given host. It also helps if your new command is easily recognisable from either field. (Your brothers-in-arms will appreciate it, I’m sure.)

The Command section is the heart of your GCC. While you won’t be able to change the class (SftpMoveFilesCommand), you must fill a few other fields seen here.

1. Determine the course of action. Typing get or put in the Operation field will determine whether GAMMA will try to copy a file from or to the external server. Use get in the first case and put in the second.

2. Specify which file(s) you want copied. GAMMA allows you to provide an exact filename or a pattern. E.g. {TODAY}.txt Note that you can use {TODAY} to represent the given date. Other wildcards are ., ?, *, $, –

3. Specify the source and destination directories. This is also straightforward, just enter the complete paths in the fields Src. directory and Dest. directory. The URL of the remote server must be entered in the following line (URL).

4. Authenticate GAMMA so it can access the remote server. For this, enter the required username and encrypted password in their respective fields.

Decide what should happen to the source file. You can rename it by entering a desired filename in the Rename field. (You can use {TODAY} wildcard for the given date here as well.) Alternatively, enter {NO} if you don’t want to rename it, or {DELETE} to delete it.

You are almost finished configuring the new GCC. You can skip the Check Command box and proceed to the Footer, which contains general setting options.

  • Check frequency min. timeout – Determines the running frequency of check commands, in certain cases. In general GAMMA Agent Info determines whether a command has to be run or not, but if this option sets a greater frequency than a GAMMA Agent Info, the given command will run in harmony with this.
  • Run in pause – If checked, the command can also be run when the GAMMA Client is paused. If the given command can trigger issues during backup, the box should not be checked.

controller command

  • Email – you can set automated email notifications for when the action is completed.

DON’T FORGET! Before you can put your new command to use, another user must authorize it. This is fairly simple. After checking that the command is filled out correctly, the user in question needs to push the Authorize button in the top left menu – and it is ready to be used.

controller command

Schedule and run your command

Now you have your new GCC for moving files, but you also need to run it. Using GAMMA, you can schedule the execution for one or more specific points in time and/or as part of a process, but you can also start it manually.

If your GCC is part of a process – let’s say, it needs to run at a certain point of the pre-COB stage -, you need to add it to said process.

  • Go to GAMMA Admin / [hostname] configurations / Controllers.
  • In the left-hand list, find and click the function you want to add the GCC to.
  • Add and configure the GCC as an Action in the right-hand window.

If scheduled individually,

  • Go to GAMMA Admin / [hostname] configurations / Controllers.
  • Add a new function for your new command. You will be prompted to name the function.

own command

  • Highlight the new function in the left-hand list, then add a new group to it.

own command

  • Configure the GCC as an Action under the Group in the right-hand window.

own command

Here, you’ll have to provide some basic information, such as the Name of your new action, the Run cmd (which is the GCC chosen from a drop-down list), and the host where you want to run execute the action. You also need to determine whether the action needed to wait for some other action of the same group to finish, or it should run independently.

The configuration options also allow you to set up email notifications in case of success and/or error. (Emails will be sent to recipients provided in the Group’s settings above. Furthermore, GAMMA can try running the command again in case of an error, if you tick the Rerunnable box as well. Tick the stoppable box if you want to make the action stoppable while it runs. Leave the COB time type setting blank.

After this you have two options: schedule the action to be run at specific times or run it manually anytime. Here’s how.

Scheduling

  • If you want to run the GCC at specific times, set up a scheduler for it.
  • Go to the bottom of the Functions list to find and click SCHEDULERS.
  • In the right-hand window, add and customize a scheduler for running your GCC.

scheduling

  • Find the function containing your GCC in the left-hand list, open it for configuration, and add the scheduler to the action.

scheduling

Manual execution

  • If you want to run the command manually, you don’t need to create and add a scheduler to the action.
  • Simply open Controller in the GAMMA main menu and select the function you have created for the GCC in question.
  • Press the Start button to run the command.

manual execution

Do you still have questions? Don’t hesitate to contact GAMMA Support. We’re happy to assist you.