Feb 142017


Os / Linux

FTP file upload using cURL

  • 14 February 2017
  • ADM


FTP file upload using cURL - images/logos/linux.jpg


It is very easy to upload files to FTP using cURL. I am using the command to send backup files from my web server to a backup server.

The following command will upload a file to a specific remote folder:

# curl -T backup-file.tar.gz ftp://username:password@ftp.server.com/backup/

If you need to use a different destination filename just add it at the end of the FTP URL:

# curl -T backup-file.tar.gz ftp://username:password@ftp.server.com/backup/backup.tar.gz