{"id":236,"date":"2025-03-07T21:47:24","date_gmt":"2025-03-08T04:47:24","guid":{"rendered":"https:\/\/eisaichen.com\/?p=236"},"modified":"2025-03-08T13:55:09","modified_gmt":"2025-03-08T20:55:09","slug":"make-linux-samba-server-support-macos-time-machine","status":"publish","type":"post","link":"https:\/\/eisaichen.com\/?p=236","title":{"rendered":"Make Linux Samba Server support MacOS Time Machine"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Assuming you already have samba server up and running. If not, you can use all-in-one solution like this one <a href=\"https:\/\/github.com\/mbentley\/docker-timemachine\">mbentley\/docker-timemachine<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide is focused on the minimal setup without redundant features.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">(Windows file systems are not supported: NTFS, Refs.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Config \/etc\/samba\/smb.conf<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following options under <code>[global]<\/code> sector:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;global]\n\nfruit:aapl = yes\nfruit:nfs_aces = no\nfruit:model = TimeCapsule8,119\nfruit:metadata = stream\nfruit:veto_appledouble = no\nfruit:posix_rename = yes\nfruit:zero_file_id = yes\nfruit:wipe_intentionally_left_blank_rfork = yes\nfruit:delete_empty_adfiles = yes<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new share for Time Machine, with following options:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;TimeMachine]\n   path = \/srv\/samba\/timemachine\n   comment = Apple TimeMachine Backup Target\n   browsable = yes\n   writable = yes\n   inherit permissions = yes\n   read only = no\n   valid users = &lt;your_username&gt;\n   vfs objects = fruit streams_xattr\n   fruit:time machine = yes\n   fruit:time machine max size = &lt;disk_quota&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change <code>path<\/code>, <code>valid users<\/code> and <code>fruit:time machine max size<\/code> accordingly.<br>For 1TB of quota, you can use<br><code>fruit:time machine max size = 1099511627776<\/code><br>or<br><code>fruit:time machine max size = 1T<\/code><br>Or just delete it for unlimited disk space.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add .plist files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming <code>\/srv\/samba\/timemachine<\/code> is where your backup stored.<br>Use the following command to create an empty file for marking.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>touch \/srv\/samba\/timemachine\/.com.apple.TimeMachine.supported<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then create a quota file (Optional)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tee -a \/srv\/samba\/timemachine\/.com.apple.TimeMachine.quota.plist &lt;&lt; EOF\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;!DOCTYPE plist PUBLIC \"-\/\/Apple\/\/DTD PLIST 1.0\/\/EN\" \"http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd\"&gt;\n&lt;plist version=\"1.0\"&gt;\n    &lt;dict&gt;\n        &lt;key&gt;GlobalQuota&lt;\/key&gt;\n            &lt;integer&gt;1099511627776&lt;\/integer&gt;\n    &lt;\/dict&gt;\n&lt;\/plist&gt;\nEOF<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now the preparation for the samba server is finished.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Connect from Mac<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>Finder<\/code> on your Mac, then on the top bar &gt; <code>Go<\/code> &gt; <code>Connect to Server<\/code><\/p>\n\n\n<p>smb:\/\/192.168.1.100\/TimeMachine<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"482\" src=\"https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/e69d10ba-af22-426b-b274-f2f4b54ad34a.jpg\" alt=\"\" class=\"wp-image-238\" srcset=\"https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/e69d10ba-af22-426b-b274-f2f4b54ad34a.jpg 992w, https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/e69d10ba-af22-426b-b274-f2f4b54ad34a-300x146.jpg 300w, https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/e69d10ba-af22-426b-b274-f2f4b54ad34a-768x373.jpg 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then, open Settings, Time Machine &gt; Add disk, and you should able to see your Linux server as an option.<br>Once set up, the backup will not engage immediately, it will proceed automatically at the next scheduled time in the background.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"731\" src=\"https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/ba99cb8a-d276-405c-9f03-f6f39cd17a09-1024x731.jpg\" alt=\"\" class=\"wp-image-241\" srcset=\"https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/ba99cb8a-d276-405c-9f03-f6f39cd17a09-1024x731.jpg 1024w, https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/ba99cb8a-d276-405c-9f03-f6f39cd17a09-300x214.jpg 300w, https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/ba99cb8a-d276-405c-9f03-f6f39cd17a09-768x548.jpg 768w, https:\/\/eisaichen.com\/wp-content\/uploads\/2025\/03\/ba99cb8a-d276-405c-9f03-f6f39cd17a09.jpg 1042w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For Discovery and Automatic Setup, you can use <a href=\"https:\/\/github.com\/avahi\/avahi\">avahi<\/a> and <a href=\"https:\/\/github.com\/Netatalk\/netatalk\">netatalk<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.samba.org\/samba\/docs\/4.9\/man-html\/vfs_fruit.8.html\">vfs_fruit<\/a><br><a href=\"https:\/\/wiki.samba.org\/index.php\/Configure_Samba_to_Work_Better_with_Mac_OS_X\">Configure Samba to Work Better with Mac OS X<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assuming you already have samba server up and running. If not, you can use all-in-one solution like this one mbentley\/docker-timemachine This guide is focused on the minimal setup without redundant features. (Windows file systems are not supported: NTFS, Refs.) Config \/etc\/samba\/smb.conf Add the following options under [global] sector: Create a new share for Time Machine, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":241,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-236","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eisaichen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":6,"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/posts\/236\/revisions\/246"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eisaichen.com\/index.php?rest_route=\/wp\/v2\/media\/241"}],"wp:attachment":[{"href":"https:\/\/eisaichen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eisaichen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eisaichen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}