WebDeploy(1) | WebDeploy - Deploy files via FTP | WebDeploy(1) |
webdeploy - Deploy local files to an ftp server.
webdeploy [options]
Options:
--exclude Specify the name of the exclude file. (default: '.exclude')
--globalexclude Specify the name of the global exclude file. (default: '.globalexclude')
--server Specify the host name or address.
--port Specify the port number for the connection. (default: 21)
--server-root Specify the root folder on the server where files should be uploaded.
--user Specify the user name for login. (defaults to current user)
--no-ftps --no-tls Disable Transport Layer Security (TLS) to use plain FTP instead of FTPS
--dry-run Print the list of local files that will be checked for upload, exit without uploading.
--ftp-dry-run Log in to the FTP server to check which local files are new or out of date, exit without uploading.
--config Specify configuration file (default: '.webdeploy_conf')
--help brief help message
For example, if you want your files uploaded to '/var/www/' on the server, then use the option '--server-root /var/www'
Note that all options can be specified using any unique abbreviation. (--conf is the same as --config, however --ser is invalid because it is the start of --server and --server-root)
WebDeploy will upload files from the current local directory to an FTP server. Files are only uploaded if the local version is newer than the server version. Files can be excluded using the 'exclude' and 'globalexclue' options.
By default, WebDeploy will look for a file called .webdeploy_conf in the current directory. If this file is found then it will load the options from this file. You can specify a different config file on the command line using the --config option.
All of the options that are available on the command line (except for the --config option) can be specified in a config file.
A config file must consist only of blank lines, comment lines (that start with a '#' symbol) and option lines (which are key-value-pairs). Option lines take the form of 'KEY = VALUE'. All characters after the first equals sign (sans leading and trailing blanks) are considered to be part of the value. A value can therefore contain an equals sign without any special escaping.
Note that no warnings will be issued if an option is specified on both the command line and the config file. In this case, the config file has priority.
Also note that option names (keys) in configuration files cannot be abbreviated like command line options.
Here is an example configuration file:
# Server connection details server = ftp.example.com port = 1234 # Login user name user = daniel # Server's public html folder server-root = var/www
An exclude file will consist only of blank lines, comment lines (that start with a '#' symbol) and patterns to match files to exclude.
To exclude a file called 'foo' you could use a config file like this:
# Exclude the file 'foo' foo
To exclude all files that end with '.foo' you can use a wildcard pattern like this:
# Exclude all files with the foo extension. *.foo
You can also match against a class of characters:
# Exclude a.foo and b.foo but not c.foo [ab].foo
To exclude a directory, simply name the directory without any leading or trailing slashes:
# Exclude the 'src' directory src
Gotcha: a directory could match a pattern you intended to only apply to regular files
Upload files via a plain ftp connection to ftp.example.com, port 1234 as user 'user@example.com'
webdeploy --server=ftp.example.com --user=user@example.com --port=1234 --no-tls
See which files need uploading (have changed since the last upload) using the settings in 'my_config.conf'
webdeploy --config my_config.conf --ftp-dry-run
See what files will be uploaded (perhaps to test a .exclude rule)
webdeploy --dry-run
WebDeploy currently doesn't support SFTP (FTP via SSH)
WebDeploy can only be used for uploading content in the current directory. It is not possible to upload content from a different directory without first changing to that directory.
WebDeploy was written by Daniel Bailey
Contact: info-d@nielbailey.com
Please report bugs via email directly to Daniel Bailey using the email address: webdeploy-bug-d@nielbailey.com
Copyright 2015 Daniel Bailey
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
2015-09-11 | Version 1.0 |