[Linux]利用Ubuntu製作Time Machine
身為一位想玩MAC又沒錢買齊整套的宅宅來說,只能找任何能替代的方案了。
這次要使用Ubuntu來打造Time Machine的環境。
這邊使用的是OrangePI去建置,其Base OS是Ubuntu 14.04。
安裝套件
apt-get install netatalk
編輯 /etc/netatalk/AppleVolumes.default
vim /etc/netatalk/AppleVolumes.default
註解~/ “Home Directory” 並且加上要放置備份的路徑。
#~/ "Home Directory"
/change/to/Ur/path/time_machine options:tm
當然,也要先建置正確的資料夾以及給予正確的權限,這邊就不多做了。 接著,來配置Avahi,(若不是使用Ubuntu的可能要再另外安裝,Ubuntu14.04一裝好就已經存在該套件)。 *1604好像沒有,可使用 apt-get install avahi-daemon安裝。
touch /etc/avahi/services/afpd.service
vim /etc/avahi/services/afpd.service
寫入:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
接著存檔以及重啟服務後照理來說在內網就可以找到Time Machine的機器了。

Update 2026-11: 現在也可以改用 Samba 的
vfs_fruit(share 設定fruit:time machine = yes)透過 SMB 提供 Time Machine,不必再裝 netatalk。