Skip to content

apofiget/tftp-mass-get

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFTP mass get utility v0.4

Description
-----------

TFTP client, which retreive remote files(pre-configured) from TFTP-enabled devices and
save them in pre-configured directory, and, if needed, add date/time prefix to the filename.
Could be used as backup agent for TFTP-enabled network devices which don't have own TFTP client.
We use it for backup configuration from Mikrotik devices.

Dependencies
-----------

- gcc
- automake && autoconf
- libcurl
- libconfig

How to build?
------------

Just run: ./build.sh

How to run?
-----------

./tftp_mass_get <arguments>

Arguments:

-c /config/file   -  config file name with full path, mandatory
-m                -  use mutex instead spinlock, should be used on non-SMP systems, optional

Configuration params
--------------------

savePath - absolute path to directory where save downloaded files, mandatory parameter
maxThreads - maximum threads which program can fork, optional parameter
filesPerThread - count of downloaded files per thread, optional parameter
defaultTemplate - default prefix template according man 3 strftime; String with this 
                  template will be added as prefix to saved file. Optional parameter.
Config should contain section named 'sources' which contain at least one data source configuration.
It should look like:

sources
{
    ip = "10.245.177.21"; - IP address of device from download file, mandatory parameter
    file = "srkn-AP.backup"; - filename to download from given IP, mandatory parameter
    saveWithTime = 1; - save file with date/time prefix like DD-MM-YYYY-HH-MM, optional parameter
    dateTemplate = "" - prefix template, according man 3 strftime; hardcoded template - "%Y%m%d-%H%M-", optional parameter
    savePath = ""; - absolute path to directory where save downloaded files, optional parameter in sources section
}

See example.cfg for details.

Author: Andrey Andruschenko <[email protected]>

About

TFTP mass get utility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published