# ownCloud files synchronization (copy)


ownCloud commandline client

# wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key
# apt-key add - < Release.key
# echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list
# apt-get update
# apt-get install owncloud-client
# owncloudcmd -h
# mkdir data
# cat sync.sh
#!/bin/bash

user="username"
password="password"
local_dir="/data"
hostname="remotehost"
path="dir/subdir"
server_url="https://$hostname/remote.php/webdav/$path"

owncloudcmd \
--silent \
--trust \
--user $user \
--password $password \
$local_dir \
$server_url

# ./sync.sh

WebDAV file system

# apt-get install davfs2
# cat mount_davfs.sh
#!/bin/bash

user="username"
password="password"
local_dir="/data"
hostname="remotehost"
path="dir/subdir"
server_url="https://$hostname/remote.php/webdav/$path"

echo -e "$user\n$password\ny" | mount.davfs $server_url $local_dir

# ./mount_davfs.sh
# ls -l /data

Reference

https://owncloud.org/install/#install-clients

No comments: