Download

FTPGrab binaries are available in releases GitHub page.

Choose the archive matching the destination platform:

And extract FTPGrab:

$ wget -qO- https://github.com/ftpgrab/ftpgrab/releases/download/6.1.0/ftpgrab_6.1.0_linux_x86_64.tar.gz | tar -zxvf - ftpgrab

Test

After getting the binary, it can be tested with ./ftpgrab --help or moved to a permanent location.

$ ./ftpgrab --help
usage: ftpgrab --config=CONFIG [<flags>]

Grab your files periodically from a remote FTP or SFTP server easily. More info
on https://ftpgrab.github.io

Flags:
  --help               Show context-sensitive help (also try --help-long and
                       --help-man).
  --config=CONFIG      FTPGrab configuration file.
  --schedule=SCHEDULE  CRON expression format.
  --timezone="UTC"     Timezone assigned to FTPGrab.
  --log-level="info"   Set log level.
  --log-json           Enable JSON logging output.
  --log-file=LOG-FILE  Add logging to a specific file.
  --docker             Enable Docker mode.
  --version            Show application version.

Server configuration

Steps below are the recommended server configuration.

Prepare environment

Create user to run FTPGrab (ex. ftpgrab)

groupadd ftpgrab
useradd -s /bin/false -d /bin/null -g ftpgrab ftpgrab

Create required directory structure

mkdir -p /var/lib/ftpgrab
chown ftpgrab:ftpgrab /var/lib/ftpgrab/
chmod -R 750 /var/lib/ftpgrab/
mkdir /etc/ftpgrab
chown ftpgrab:ftpgrab /etc/ftpgrab
chmod 770 /etc/ftpgrab

Configuration

Before running, you must create your first configuration file in /etc/ftpgrab/ftpgrab.yml.

chown ftpgrab:ftpgrab /etc/ftpgrab/ftpgrab.yml
chmod 644 /etc/ftpgrab/ftpgrab.yml

Copy binary to global location

cp ftpgrab /usr/local/bin/ftpgrab

Running FTPGrab

After the above steps, two options to run FTPGrab:

See how to create a Linux service to start FTPGrab automatically.

2. Running from command-line/terminal

/usr/local/bin/ftpgrab --config /etc/ftpgrab/ftpgrab.yml --schedule "0 */30 * * * *"

Updating to a new version

You can update to a new version of FTPGrab by stopping it, replacing the binary at /usr/local/bin/ftpgrab and restarting the instance.

If you have carried out the installation steps as described above, the binary should have the generic name ftpgrab. Do not change this, i.e. to include the version number.