nextcloud-desktop/doc/owncloudcmd.rst

65 lines
2.1 KiB
ReStructuredText
Raw Normal View History

2014-03-20 19:35:24 +04:00
The ownCloud Client packages come with a command line client which
can be used to synchronize ownCloud files to client machines. The
command line client is called ``owncloudcmd``.
2014-03-25 22:03:47 +04:00
owncloudcmd performs a single sync run and then exits.
2014-03-20 19:35:24 +04:00
That means that it processes the differences between client- and
server directory and propagates the files to get both repositories
2014-03-25 22:03:47 +04:00
on the same status. Contrary to the GUI based client, it does not
repeat syncs on its own. It does also not monitor for file system
changes.
2014-03-20 19:35:24 +04:00
To invoke the command line client, the user has to provide the local
2014-03-25 22:03:47 +04:00
and the remote repository urls::
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
owncloudcmd [OPTIONS...] sourcedir owncloudurl
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
where ``sourcedir`` is the local directory and ``owncloudurl`` is
2014-03-20 19:35:24 +04:00
the server url.
2014-03-25 22:03:47 +04:00
.. note:: Prior to 1.6, the tool only accepted ``owncloud://`` or
``ownclouds://`` in place of ``http://`` and ``https://``
as a scheme. See ``Examples`` for details.
2014-03-20 19:35:24 +04:00
These are other comand line switches supported by owncloudcmd:
2014-03-25 22:03:47 +04:00
``--silent``
Don't give verbose log output
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
``--confdir`` `PATH`
Fetch or store configuration in this custom config directory
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
``--httpproxy http://[user@pass:]<server>:<port>``
Use ``server`` as HTTP proxy
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
Credential Handling
~~~~~~~~~~~~~~~~~~~
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
By default, owncloudcmd reads the client configuration and uses the credentials
of the GUI sync client. If no client was configured or to use a different user
to sync, the user password setting can be specified with the usual URL pattern,
for example::
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
https://user:secret@192.168.178.2/remote.php/webdav
2014-03-20 19:35:24 +04:00
2014-03-25 22:03:47 +04:00
Example
~~~~~~~
To sync the ownCloud directory ``Music`` to the local directory ``media/music``
through a proxy listening on port ``8080`` on the gateway machine ``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/webdav/Music
Using the legacy scheme, it would look like this::
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
ownclouds://server/owncloud/remote.php/webdav/Music
2014-03-20 19:35:24 +04:00