This article provides instructions for configuring the Command-Line FTP client to work with Egnyte. For background information about uploading files using FTP and access to other FTP configuration guides, please see FTP Overview and FTP-Settings articles.
For transferring more than 50GB of data, consider using Egnyte's Migration App or some other third-party tool designed to handle larger data migrations.
Exclusions: Refer to this article for unsupported characters and excluded file types that will not be synced.
FTP / FTPES
SFTP
FTP / FTPES
LINUX / POSIX
cURL can be easily used to transfer files using FTP protocol and with SSL.
Syntax
curl -k -T <file> --ftp-ssl --ftp-pasv -u "<username>\mce_marker<domain-name>:<egnyte-password>" ftp://ftp-<egnyte-domain>.egnyte.com/
- Replace <username> with the actual Egnyte username.
- Replace <domain-name> with the actual Egnyte domain name.
- Replace <password> with the actual Egnyte password.
Too many incorrect password attempts may temporarily block the access for security reasons. If this happens, please wait for some time before trying again with the correct password.
Here are some examples where the username is John and the domain is Acme:
Create a folder named testdirectory under the Shared folder
curl -k -Q "MKD /Shared/testdirectory" --ftp-ssl --ftp-pasv -u "john\$acme:password" ftp://ftp-acme.egnyte.com/
Uploading a file to a folder
curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "john\$acme:password" ftp://ftp-acme.egnyte.com/Shared/testdirectory/
Download a file
curl -k --ftp-ssl --ftp-pasv -u "john$acme:password" ftp://ftp-acme.egnyte.com/Shared/Documents/testfile.txt
Users can also FTP files into a folder using a script
Here is a simple curl script :
curl --user <username>@<domain-name>:<password> -T <Local File Path> ftp://ftp-<domain_name>.egnyte.com/<Egnyte-file-path>
Example:
curl --user john@acme:password -T /home/John/somefile.txt ftp://ftp-acme.egnyte.com/Shared/mybackup/somefile.txt
Note: The folder /Shared/mybackup should already exist in Egnyte.
Users can carefully script each basic operation needed. For a simple operation of backing up log files, they can run a script once each day that creates a folder representing that day (date-time) and upload log files to that folder on FTP and over SSL.
Users can also avoid including the plain text password in the curl command:
curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "john$acme" ftp://ftp-acme.egnyte.com/Shared/testdirectory/
The user will be prompted for a password before starting the transfer.
SFTP
We recommend using the standard Linux sshpass command-line utility for scripting. Ensure proper access to the local file containing the password. For instance, if the SSH password is stored in ~/.ssh/secret, the following command can be used to connect to Egnyte SFTP:
sshpass -f ~/.ssh/secret sftp '<username>$<domain-name>'@ftp-<domain-name>.egnyte.com
- Replace <domain-name> with the actual Egnyte domain name
- Replace <username> with the actual Egnyte username.
Ex:
$ sshpass -f ~/.ssh/secret sftp 'bob$acme'@ftp-acme.egnyte.com
Connected to ftp-acme.egnyte.com.
sftp>
Alternatively, the command below can be used to manually access Egnyte via SFTP.
sftp 'bob$acme'@ftp-acme.egnyte.com
The user will be prompted to input their password manually.