About

What is lmftp more
Features more
News more

Documentation

Installation more
User Guide more
FAQ more
Change Log more

Other

Roadmap more
Feedback more

User Guide

Let me explain how to use lmftp with an example scenario, find a more detailed command reference below:
You want to transfer a file named source.txt from a Server called server1.example.local to a server called server2.example.local every day at 06am.
The file source.txt should be compressed before transferring it to the destination server and you want to get an email informing you wheter the transfer was successfull upon completion.

You would have to do the following to configure this using lmftp:
Open lmftp cli (enter lmftp and press enter).
Create two host objects for server1 and server2 using the following commands:

   create host hostname:server1 address:server1.example.local user:username password:password
   create host hostname:server2 address:server2.example.local user:username password:password

Create a path object to specify the file source.txt:

   create path pathname:source.txt path:/somefolder/source.txt

Create a path object to specify the destination folder:

   create path pathname:someotherfolder path:/some/other/folder

Create two location objects to link the path objects to their host objects:

   create location locationname:server1:source.txt hostname:server1 pathname:source.txt
   create location locationname:server2:someotherfolder hostname:server2 pathname:someotherfolder

Create a notification object to specify the email address notifications can be send to:

   create notification notificationname:yourname email:yourname@example.local

Create a job object for the file transfer:

   create job jobname:examplejob sources:server1:source.txt destinations:server2:someotherfolder notifications:yourname concatenatesources:0 zipsources:filename.zip backupsources:0 deletesources:0 completeness:0 retry:0

And finaly schedule this job:

   create schedule schedulename:exampleschedule jobname:examplejob regulary:11111110600

lmftp will now download the file source.txt every day from server1.example.local, zip it into filename.zip and upload it to server2.example.local.
As you are now happy with lmftp and up to configure new jobs you surely want to use some abbreviations, find them at the bottom of this site.

command reference:

show [OBJECT FILTER (DETAILS) | SETTINGS | LOG]

   show OBJECT any (details:ATTRIBUTE(,ATTRIBUTE...))
   This command shows attributes values of all configured objects of the specified objecttype.
   Valid objecttypes are: host, path, location, notification, job, schedule.
   If details: is ommitted, lmftp decides which attributes are displayed.
   To define which attributes are to be displayed, use details: with a comma-seperated list of attributes.
   Example: s host any dt:hn,ad,us,pw shows the name, address, user and password of all configured hosts.

   show OBJECT ATTRIBUTE:VALUE(,ATTRIBUTE:VALUE...) (details:ATTRIBUTE(,ATTRIBUTE...))
   This command shows attributes values of all objects identified by objecttype and the first list of ATTRIBUTE:VALUE pairs.
   Valid objecttypes are: host, path, location, notification, job, schedule
   Valid attributes are all attributes the objecttype has.
   If details: is ommitted, lmftp decides which attributes are displayed.
   To define which attributes are to be displayed, use details: with a comma-seperated list of attributes.
   Example: s host ad:host1.example.local,us:user1 dt:hn shows the name of all configured hosts that have host1.example.local as address and user1 as user.

   show mailsettings
   This command shows the configured mail settings

   show pathsettings
   This command shows the configured pathsettings

   show log
   This command shows the logfile

create [host|path|location|notification|job|schedule|mailsettings|pathsettings|backup] ATTRIBUTE:VALUE ATTRIBUTE:VALUE ...

   create host hostname:HOSTNAME address:ADDRESS user:USER password:PASSWORD
   This command creates a host object (respectively a ftp account).
   hostname: Name of the host object to be created.
   address: IP-Address or hostname to use with this object.
   user: Login name to use with this object.
   password: Password to use with this object.
   Example: c host hn:host1 ad:host1.example.local user:user1 password:secret creates a host object called host1 having host1.example.local as it's address user1 as it's user and secret as it's password.

   create path pathname:PATHNAME path:PATH
   This command creates a path object describing a file or a folder.
   pathname: Name of the path object to be created.
   path: Path to the file or folder to use with this object.
   Example: c path pn:source path:/home/user1/sourcefile.txt creates a path object describing a file.
   Example: c path pn:destination path:/backups creates a path object describing a folder.

   create location locationname:LOCATIONNAME hostname:HOSTNAME pathname:PATHNAME
   This command creates a location object (a link between a host object and a path object) for use in job objects.
   locationname: Name of the location object to be created.
   hostname: Name of an existing host object to use in this location object.
   pathname: Name of an existing path object to use in this location object.
   Example: c location ln:location1 hn:host1 pn:source creates a location object called location1 linking host host1 and path source.

   create notification notificationname:NOTIFICATIONNAME email:EMAIL
   This command creates a notification object for use in job objects.
   notificationname: Name of the notification object to be created.
   email: Email address to use in this notification object.
   Example: c notification nn:recipient1 em:recipient1@example.local creates a notification object called recipient1 having recipient1@example.local as it's email adress.

   create job jobname:JOBNAME sources:LOCATIONNAME(,LOCATIONNAME...) destinations:LOCATIONNAME(,LOCATIONNAME...) notifications:NOTIFICATIONNAME(,NOTIFICATIONNAME...) concatenatesources:[0|FILENAME] zipsources:[0|FILENAME] backupsources:[0|1] deletesources:[0|1] completeness:[0|1] retry:[0-9999]
   This command creates a job object which can be scheduled.
   jobname: Name of the job object to be created.
   sources: Comma-seperated list of location objects describing which files to transfer in this job.
   destinations: Comma-seperated list of location objects describing where to transfer the source files to.
   notifications: Comma-seperated list of notification objects describing whom to send the job results.
   concatenatesources: Specify whether the sources files should be concatenated in one file (then specify the name of this file) or not (then use 0).
   zipsources: Specify whether the sources should be compressed before uploading (then specify the name of the archive) or not (then use use 0).
   backupsources: Specify whether you want lmftp to store a local copy of the sources in it's backup path (1) or not (0).
   deletesources: Specify whether the sources should be deleted on the source locations (1) or not (0).
   completeness: Specify whether lmftp should cancel this job upon the first error (1) or not(0).
   retry: Specify whether lmftp should restart this job if it hasn't run successfull (in minutes from 1 - 9999) or not (0).
   Example: c job jn:job1 so:source de:destination no:recipient1 cs:0 zs:archive.zip bs:0 ds:0 co:0 re:0 creates a job object called job1 which transfers the file specified by locationobject source to the ftp server specified by the locationobject destination. The sources are not concatenated (it's just one source anyway) but compressed to a zip-archive called archive.zip (which is not backed up locally) and not deleted on their source hosts. This job does not cancel upon an error (imagine you have more then one source or destination the job would still continue if a location is not available) and is not restartet if it did not run successfully.

   create schedule schedulename:SCHEDULENAME jobname:JOBNAME [onetime:YYYYMMDDhhmm|regulary:[0|1][0|1][0|1][0|1][0|1][0|1][0|1]hhmm]
   This command creates a schedule for a job describing when lmftp shall run this job.
   schedulename: Name of the schedule to be created.
   jobname: Name of the job object to be scheduled.
   onetime: Specifies a one-time job with Y(ear)Y(ear)Y(ear)Y(ear)M(onth)M(onth)D(ay)D(ay)(our)h(our)m(inute)m(inute).
   regulary: Specifies a regulary job with the first seven digits defining the days of the week (1 = yes, 0 = no) from monday (first digit) to sunday (seventh digit) and the last four digits defining the time with h(our)h(our)m(inute)m(inute)
   Example: c schedule sn:schedule1 jn:job1 rg:11111110600 schedules the job job1 to be run every day at 06am.
   Example: c schedule sn:schedule2 jn:job1 on:201003310600 schedules the job job1 to be run once on March 31th 2010 at 06am.

   create mailsettings
   This command creates the initial mailsettings. You won't need this normally, only if your mailsettings got deleted

   create pathsettings backups:BACKUPSPATH logs:LOGPATH workspace:WORKSPACE
   This command creates the initial pathsettings. You won't need this normally, only if your pathsettings got deleted
   backups: Specifies the path where to store backups
   logs: Specifies the path where to place the log
   workspace: Specifies the path where to store and work with downloaded sources before uploading

   create backup
   This command creates a backup file containing all objects and settings in lmftps backup path
   This will ease reconfiguration if your config got lost

edit [host|path|location|notification|job|schedule|mailsettings|pathsettings] IDENTIFIER PARAMETER

   edit OBJECT ATTRIBUTE:VALUE(,ATTRIBUTE:VALUE...) ATTRIBUTE:VALUE(,ATTRIBUTE:VALUE...)
   This command edits the objects identified by the first list of ATTRIBUTE:VALUE-pairs and replaces the attributes identified by the second list of ATTRIBUTE:VALUE-pairs.
   Valid objects are: host, path, location, notification, job, schedule
   Valid attributes are all attributes the objecttype has.
   Example: e host ad:host1.example.local ad:host2.example.local changes the address in all host objects that have host1.example.local as address to host2.address.local
   Example: e host ad:host1example.local,us:user1 pw:public changes the password in all host objects that have host1.example.local as address AND user1 as user.
   Example: e host hn:host1 hn:host2 changes the name of hostobject host1 to host2 and updates all locationobjects using this hostobject with its new name.

   edit OBJECT ATTRIBUTE:VALUE(,ATTRIBUTE:VALUE...) ATTRIBUTE:+/-VALUE
   This command adds a value to an attribute for all objects identified by the first list of ATTRIBUTE:VALUE-pairs.
   Valid objects are: jobs
   Valid attributes are: sources,destinations and notifications
   Example: e job jn:job1 so:+source2 adds the location source2 to the list of source locations in job1.

   edit mailsettings ATTRIBUTE:VALUE (ATTRIBUTE:VALUE...)
   This command alters mail settings configuration.
   Valid attributes are: server, port, user, password, sender
   Example: e mailsettings server:mail.example.local sets mail.example.local as mailserver to use when sending notifications.

   edit pathsettings ATTRIBUTE:VALUE (ATTRIBUTE:VALUE)
   This command alters path settings configuration.
   Valid parameter types are: backups, logs, workspace
   Example: e pathsettings backups:/backups sets /backup as the path to store backups at.

delete OBJECT FILTER

   delete OBJECT ATTRIBUTE:VALUE(,ATTRIBUTE:VALUE...)
   This command deletes the objects identified by the list of ATTRIBUTE:VALUE-pairs.
   The object to be deleted must not be used by any other definition or the command will fail.
   Valid object types are: host, path, location, notification, job, schedule
   Valid attributes are all attributes the object has.
   Example: d host hn:host1 deletes the host object host1.
   Example: d host ad:host1.example.local,us:user1 deletes every host object having host1.example.local as address and user1 as user.
   Example: d host any deletes every host object.

run JOBNAME

   run JOBNAME
   This command immediately executes the given job


shortcuts:

You can use the following shortcuts in the above commands:
s = sh = show
c = cr = create
e = ed = edit
d = dl = delete
hn = hostname
ad = address
us = user
pw = password
pn = pathname
pa = path
ln = locationname
nn = notificationname
em = email
jn = jobname
so = sources
de = destinations
no = notifications
cs = concatenatesources
zs = zipsources
bs = backupsources
ds = deletesources
co = completeness
re = retry
sn = schedulename
on = onetime
rg = regulary
dt = details