CentOS7 使用命令行Webdav客户端连接OwnCloud、NextCloud

来源:互联网 发布:毕业设计的要求与数据 编辑:程序博客网 时间:2024/05/29 13:05

平时折腾OwnCloud、NextCloud的时候,难免会出意外:数据库损坏、误删数据文件目录等等。如果服务器上有文件备份,可以使用OwnCloud、NextCloud的webdav将数据导入,就不用下载文件再重新上传了。
我使用的是客户端是davfs2。
安装davfs2
yum install davfs2
连接Owncloud、NextCloud webdav。
mount -t davfs https://Owncloud、NextCloud服务器地址/remote.php/webdav/ /mnt

[root@corigin mnt]# mount -t davfs https://…/remote.php/webdav/ /mnt
Please enter the username to authenticate with server
https://…/remote.php/webdav/ or hit enter for none.
Username: 1
Please enter the password to authenticate user 1 with server
https://…/remote.php/webdav/ or hit enter for none.
Password:
/sbin/mount.davfs: warning: the server does not support locks
/sbin/mount.davfs: Warning: can’t write entry into mtab, but will
mount the file system anyway

出现“Username:”的时候输入用户名,出现“Password:”的时候输入密码,输入密码的时候和ssh登录centos7一样,密码不显示,输入完后按enter。
现在可以使用像使用本地硬盘一样使用owncloud了
查看一下硬盘使用情况
df -h

[root@corigin files]# df -h 文件系统 容量 已用 可用 已用% 挂载点 ……
https://…/remote.php/webdav/ 107G 107G 0 100% /mnt

显示使用100%,但这个并不影响往里面拷贝文件。

0 0
原创粉丝点击