2015-04-24 21:44:38 +03:00
|
|
|
The ownCloud Client packages contain a command line client, ``owncloudcmd``, that can
|
|
|
|
be used to synchronize ownCloud files to client machines.
|
2015-04-24 21:34:20 +03: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 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
|
2014-12-31 22:27:52 +03:00
|
|
|
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
|
|
|
|
2015-04-24 21:34:20 +03:00
|
|
|
Other command 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]``
|
2016-01-07 00:33:39 +03:00
|
|
|
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]``
|
2016-01-07 00:33:39 +03:00
|
|
|
Use ``password`` as the password.
|
2014-03-20 19:35:24 +04:00
|
|
|
|
2014-09-18 13:36:02 +04:00
|
|
|
``-n``
|
2016-01-07 00:33:39 +03:00
|
|
|
Use ``netrc (5)`` for login.
|
2014-09-18 13:36:02 +04:00
|
|
|
|
|
|
|
``--non-interactive``
|
2016-01-07 00:33:39 +03:00
|
|
|
Do not prompt for questions.
|
2014-09-18 13:36:02 +04:00
|
|
|
|
2016-01-07 00:33:39 +03:00
|
|
|
``--silent``, ``--s``
|
|
|
|
Inhibits verbose log output.
|
2014-09-18 13:36:02 +04:00
|
|
|
|
|
|
|
``--trust``
|
2016-01-07 00:33:39 +03:00
|
|
|
Trust any SSL certificate, including invalid ones.
|
2014-09-18 13:36:02 +04:00
|
|
|
|
|
|
|
``--httpproxy http://[user@pass:]<server>:<port>``
|
2016-01-07 00:33:39 +03:00
|
|
|
Uses ``server`` as HTTP proxy.
|
2014-03-20 19:35:24 +04:00
|
|
|
|
2015-11-03 15:43:26 +03:00
|
|
|
``--nonshib``
|
|
|
|
Uses Non Shibboleth WebDAV Authentication
|
|
|
|
|
|
|
|
``--davpath [path]``
|
|
|
|
Overrides the WebDAV Path with ``path``
|
|
|
|
|
2016-01-07 00:33:39 +03:00
|
|
|
``--exclude [file]``
|
|
|
|
Exclude list file
|
|
|
|
|
|
|
|
``--unsyncedfolders [file]``
|
2017-02-20 12:52:22 +03:00
|
|
|
File containing the list of un-synced remote folders (selective sync)
|
2016-01-07 00:33:39 +03:00
|
|
|
|
|
|
|
``--max-sync-retries [n]``
|
|
|
|
Retries maximum n times (defaults to 3)
|
|
|
|
|
|
|
|
``-h``
|
2017-11-25 13:03:36 +03:00
|
|
|
Sync hidden files, do not ignore them
|
2016-01-07 00:33:39 +03:00
|
|
|
|
2014-03-25 22:03:47 +04:00
|
|
|
Credential Handling
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2014-03-20 19:35:24 +04:00
|
|
|
|
2017-03-20 17:48:24 +03:00
|
|
|
``owncloudcmd`` requires the user to specify the username and password using the standard URL pattern, e.g.,
|
|
|
|
|
|
|
|
::
|
2014-03-20 19:35:24 +04:00
|
|
|
|
2017-01-03 13:31:27 +03:00
|
|
|
$ owncloudcmd /home/user/my_sync_folder https://carla:secret@server/owncloud/remote.php/webdav/
|
2014-03-25 22:03:47 +04:00
|
|
|
|
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
|
|
|
|
|
2015-04-24 21:34:20 +03:00
|
|
|
``owncloudcmd`` will prompt for the user name and password, unless they have
|
2015-04-24 21:44:38 +03:00
|
|
|
been specified on the command line or ``-n`` has been passed.
|
2017-04-04 10:38:23 +03:00
|
|
|
|
|
|
|
Exclude List
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
``owncloudcmd`` requires access to an exclude list file. It must either be
|
|
|
|
installed along with ``owncloudcmd`` and thus be available in a system location,
|
|
|
|
be placed next to the binary as ``sync-exclude.lst`` or be explicitly specified
|
|
|
|
with the ``--exclude`` switch.
|