ubuntu安装seafile命令版seafile-cli

需求目的,相对我的seafile使用restic工具进行定时备份,所以研究了下。

参考链接:
https://help.seafile.com/syncing_client/install_linux_client/

备份实现思路:

  • 安装Ubuntu Server22.04;
  • 安装seafile-cli,并同步整库;
  • 安装restic,并每天进行备份;

一、seafile-cli篇

经过博主验证,sync的库是实时同步的,其它位置修改后,此处会保持一致。

1.1安装cli

配置源

sudo bash -c "echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/seafile-keyring.asc] https://linux-clients.seafile.com/seafile-deb/jammy/ stable main' > /etc/apt/sources.list.d/seafile.list"

更新源

sudo apt update

安装

sudo apt-get install seafile-cli

1.2基础使用

初始化仓库

mkdir ~/seafile-client            # create the settings folder
seaf-cli init -d ~/seafile-client  # initialise seafile client with this folder
seaf-cli start

下载同步库

seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> [-p <password>]

查看状态

seaf-cli status  # check status of ongoing downloads

二、restic篇

请参考此文:跨平台、多端加密同步神器 Restic – 造极 (claves.cn)