nextcloud-desktop/doc/owncloudcmd.rst

79 lines
2.7 KiB
ReStructuredText
Raw Normal View History

2014-06-26 00:04:33 +04:00
The ownCloud Client packages contain a command line client that can be used to
synchronize ownCloud files to client machines. The command line client is
called ``owncloudcmd``.
2014-03-20 19:35:24 +04:00
2014-06-26 00:04:33 +04:00
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
2014-06-26 00:04:33 +04:00
synchronizations on its own. It also does not monitor for file system changes.
2014-03-20 19:35:24 +04:00
To invoke ``owncloudcmd``, you must provide the local and the remote
repository
URL using the following command::
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-06-26 00:04:33 +04:00
the server URL.
2014-03-20 19:35:24 +04:00
2014-06-26 00:04:33 +04:00
.. note:: Prior to the 1.6 version of owncloudcmd, 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
2014-06-26 00:04:33 +04:00
Other comand line switches supported by owncloudcmd include the following:
2014-03-20 19:35:24 +04:00
2014-09-18 13:36:02 +04:00
``--user``, ``-u`` ``[user]``
Use ``user`` as the login name.
2014-03-20 19:35:24 +04:00
2014-09-18 13:36:02 +04:00
``--password``, ``-p`` ``[password]``
Use ``password`` as the password.
2014-03-20 19:35:24 +04:00
2014-09-18 13:36:02 +04:00
``-n``
Use ``netrc (5)`` for login.
``--non-interactive``
Do not prompt for questions.
``--silent``, ``-s``
Inhibits verbose log output.
``--trust``
Trust any SSL certificate, including invalid ones.
``--httpproxy http://[user@pass:]<server>:<port>``
2014-06-26 00:04:33 +04:00
Uses the specified ``server`` as the 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
By default, ``owncloudcmd`` reads the client configuration and uses the
2015-01-01 01:48:17 +03:00
credentials of the GUI synchronization client. If no client is configured, or if you choose
2014-06-26 00:04:33 +04:00
to use a different user to synchronize, you can specify the user password
setting 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
~~~~~~~
2014-06-26 00:04:33 +04:00
To synchronize the ownCloud directory ``Music`` to the local directory
2014-09-18 13:36:02 +04:00
``media/music``, through a proxy listening on port ``8080``, and on a gateway
2014-06-26 00:04:33 +04:00
machine using IP address ``192.168.178.1``, the command line would be::
2014-03-25 22:03:47 +04:00
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
https://server/owncloud/remote.php/webdav/Music
2014-09-18 13:36:02 +04:00
``owncloudcmd`` will enquire user name and password, unless they have
been specified on the command line or ``-n`` has been passed.
2014-03-25 22:03:47 +04:00
2014-06-26 00:04:33 +04:00
Using the legacy scheme, the command line would be::
2014-03-25 22:03:47 +04:00
$ 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