The Command Line Client
Introduction
The ownCloud Client packages contain a command line client, owncloudcmd, that can be used to synchronize ownCloud files to client machines.
Command Description
owncloudcmd
performs a single sync run and then exits the synchronization process. In this manner, owncloudcmd
processes the differences between client and server directories and propagates the files to bring both repositories to the same state. Contrary to the GUI-based client, owncloudcmd
does not repeat synchronizations on its own. It also does not monitor for file system changes.
To invoke owncloudcmd
, you must provide the local and the remote repository URL using the following command:
owncloudcmd [options] source_dir server_url remote_folder.
-
sourcedir
is the local directory, -
owncloudurl
is the server URL and -
remote_folder
is a remote folder.
Other command line switches supported by owncloudcmd
include the following:
Switch | Description |
---|---|
|
Don’t be so verbose. |
|
Specify a HTTP proxy to use. |
|
Trust the SSL certification |
|
Path to an exclude list [file] |
|
File containing the list of unsynced remote folders (selective sync) |
|
Use [url] as the location of the server. Infinite Scale only (server location and spaces URL can differ) |
|
Use [name] as the login name |
|
Use [pass] as password |
|
Use netrc (5) for login |
|
Do not block execution with interaction |
|
Retries maximum n times (default to 3) |
|
Limit the upload speed of files to n KB/s |
|
Limit the download speed of files to n KB/s |
|
More verbose logging |
|
Displays help on commandline options. |
|
Displays help including Qt specific options. |
|
Displays version information. |
Credential Handling
owncloudcmd
requires the user to specify the username and password using the standard URL pattern, for example:
$ owncloudcmd /home/user/my_sync_folder https://carla:secret@server/owncloud/remote.php/dav/files/carla/
To synchronize the ownCloud directory Music
to the local directory media/music
, through a proxy listening on port 8080
, and on a gateway machine using IP address 192.168.178.1
, the command line would be:
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
https://server/owncloud/remote.php/dav/files/carla/Music.
owncloudcmd
will prompt for the username and password, unless they have been specified on the command line or -n
has been passed.