Feb 142017


FTP file upload using cURL

  • February 14 2017
  • ADM



FTP file upload using cURL - linux


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:[email protected]/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:[email protected]/backup/backup.tar.gz