3

使用Debian 创建Mac的Timemachine

 6 months ago
source link: https://blog.dreamtobe.cn/debian_as_timemachine_server/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

使用Debian 创建Mac的Timemachine

使用Debi_
2023年10月1日 下午
828 字 7 分钟 5 次

本文最后更新于:2023年10月1日 凌晨

这里我们使用netatlkavahi-daemon服务来让debian实现支持局域网发现timemachine,提供timemachine服务。

sudo apt install netatalk avahi-daemon

创建用户以及添加一个有权限的目录,其中的your-xx自己根据情况修改即可。

sudo useradd --no-create-home your-username
sudo mkdir /srv/timemachine
sudo chown your-username:your-usergroup /srv/timemachine

如果需要给账户添加密码,在timemachine连接的时候登录该账号,就给账户添加下密码:

sudo passwd mbp

编辑配置/etc/netatalk/afp.conf,下面的配置中配置限制的大小为700G,其他的根据自己的想法进行配置即可

;
; Netatalk 3.x configuration file
;

[Global]
hostname = your-hostname

[TimeMachine]
path = /srv/timemachine
time machine = yes
valid users = your-username
vol size limit = 700000

配置防火墙开启对应端口:

sudo ufw allow 548
sudo ufw allow 427
sudo ufw allow 4700

启用服务:

sudo systemctl enable avahi-daemon
sudo systemctl start avahi-daemon
sudo systemctl enable netatalk
sudo systemctl start netatalk

此时就可以在mac上找到这个Timemachine磁盘了。



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK