owncloudcmd.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. The ownCloud Client packages contain a command line client, ``owncloudcmd``, that can
  2. be used to synchronize ownCloud files to client machines.
  3. ``owncloudcmd`` performs a single *sync run* and then exits the synchronization
  4. process. In this manner, ``owncloudcmd`` processes the differences between
  5. client and server directories and propagates the files to bring both
  6. repositories to the same state. Contrary to the GUI-based client,
  7. ``owncloudcmd`` does not repeat synchronizations on its own. It also does not
  8. monitor for file system changes.
  9. To invoke ``owncloudcmd``, you must provide the local and the remote repository
  10. URL using the following command::
  11. owncloudcmd [OPTIONS...] sourcedir owncloudurl
  12. where ``sourcedir`` is the local directory and ``owncloudurl`` is
  13. the server URL.
  14. Other command line switches supported by ``owncloudcmd`` include the following:
  15. ``--user``, ``-u`` ``[user]``
  16. Specify the user's login name.
  17. ``--password``, ``-p`` ``[password]``
  18. Specify the user's password.
  19. ``-n``
  20. Use ``netrc (5)`` for login.
  21. ``--non-interactive``
  22. Do not prompt for questions.
  23. ``--silent``, ``-s``
  24. Inhibits verbose log output.
  25. ``--trust``
  26. Trust any SSL certificate, including invalid ones.
  27. ``--httpproxy http://[user@pass:]<server>:<port>``
  28. Uses the specified ``server`` as the HTTP proxy.
  29. ``--unsyncedfolders [file]``
  30. File containing list of folders to not sync
  31. Credential Handling
  32. ~~~~~~~~~~~~~~~~~~~
  33. ``owncloudcmd`` uses the credentials of the GUI synchronization client.
  34. If no client is configured, or if you choose to use a different user to synchronize,
  35. you can specify the user
  36. password setting with the usual URL pattern. For example::
  37. $ owncloudcmd / https://carla:secret@server/owncloud/remote.php/webdav/
  38. To synchronize the ownCloud directory ``Music`` to the local directory
  39. ``media/music``, through a proxy listening on port ``8080``, and on a gateway
  40. machine using IP address ``192.168.178.1``, the command line would be::
  41. $ owncloudcmd --httpproxy http://192.168.178.1:8080 \
  42. $HOME/media/music \
  43. https://server/owncloud/remote.php/webdav/Music
  44. ``owncloudcmd`` will prompt for the user name and password, unless they have
  45. been specified on the command line or ``-n`` has been passed.