免费webdav网盘https://infini-cloud.net/en/,注册+邀请码=25GB空间,我的邀请码:5JV7G

  • 操作步骤

    • 安装程序
      #Centos
      yum install -y davfs2
      # Debian/Ubuntu
      apt install -y davfs2
    • 创建挂载目录并且挂载

      mkdir /mnt/remote_disk
      mount -t davfs https://wani.teracloud.jp/dav/ /mnt/remote_disk/

      mount命令之后会输入一个用户名和密码,输入即可

      image-20230609193503801

    • 查看挂载情况

      image-20230609193541483

    • 设置开机自启

      • 编辑davfs2.conf配置文件,将use_locks的1改为0

        vim /etc/davfs2/davfs2.conf 

        image-20230609200759598

      • 修改secrets文件

        vim /etc/davfs2/secrets

        再最后一行添加账号信息

        https://wani.teracloud.jp/dav/ 账号 密码

        image-20230609200931114

      • 设置开启挂载

        vim /etc/rc.local

        添加挂载信息

        mount -t davfs https://wani.teracloud.jp/dav/ /mnt/remote_disk/

        image-20230609201128579

  • 相关问题

    • /sbin/mount.davfs: mounting failed; the server does not support WebDAV报错

      image-20230610171500065

      编辑/etc/davfs2/davfs2.conf文件,找到ignore_dav_header将注释取消,把0改为1

      vim /etc/davfs2/davfs2.conf

      image-20230610171239958

      重新挂载

      image-20230610171650154

    • /sbin/mount.davfs: Warning: can't write entry into mtab, but will mount the file system anyway报错

      sudo rm /etc/mtab
      sudo touch /etc/mtab
      sudo chmod a+r /etc/mtab
  • 进阶操作

    • 利用rsync备份数据到webdav

      rsync -av /root/file-static/ /mnt/remote_disk/file-static/

      image-20230609201438116

  • 参考链接

文章目录