使用 syncthing
同步不同机器之间的文件,所有数据均保留在本地机器。
安装
1
2
3
4
5
6
7
8
9
|
## 安装发布密钥
sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
## 添加apt:稳定发布渠道
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
## [可选]添加apt:优先发布渠道
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list
## 安装
sudo apt-get update -y
sudo apt-get install syncthing -y
|
配置
我使用 systemd
维护自启动服务,可以到官网下载 systemd文件
1
2
3
4
|
cd /etc/systemd/system/
sudo systemctl enable syncthing@william --now
sudo systemctl restart syncthing@william --now
sudo systemctl status syncthing@william --now
|