{"id":1176,"date":"2016-05-01T07:03:10","date_gmt":"2016-05-01T06:03:10","guid":{"rendered":"http:\/\/cdblog.cdstealer.com\/?p=1176"},"modified":"2016-07-23T15:57:36","modified_gmt":"2016-07-23T14:57:36","slug":"timecapsule-on-linux","status":"publish","type":"post","link":"https:\/\/cdblog.cdstealer.com\/?p=1176","title":{"rendered":"Timecapsule on Linux"},"content":{"rendered":"<h1><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1177\" src=\"http:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/05\/TimeMachine01_Logo1.png\" alt=\"TimeMachine01_Logo1\" width=\"256\" height=\"256\" srcset=\"https:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/05\/TimeMachine01_Logo1.png 256w, https:\/\/cdblog.cdstealer.com\/wp-content\/uploads\/2016\/05\/TimeMachine01_Logo1-150x150.png 150w\" sizes=\"auto, (max-width: 256px) 100vw, 256px\" \/><\/h1>\n<h1><span style=\"text-decoration: underline;\">TIME CAPSULE INSTALL &amp; SETUP<\/span><\/h1>\n<p><strong>Install Netatalk<\/strong><\/p>\n<pre># emerge -av netatalk<\/pre>\n<pre>net-fs\/netatalk-3.1.6::gentoo USE=\"(acl) avahi cracklib dbus pam samba shadow ssl tcpd utils -debug -kerberos -ldap -pgp -quota -static-libs -tracker\" PYTHON_TARGETS=\"python2_7\"<\/pre>\n<p><strong>Configure Netatalk<\/strong><\/p>\n<p>Edit the file \/etc\/afp.conf:<\/p>\n<pre>vi \/etc\/afp.conf<\/pre>\n<p>Place the following contents. Edit the paths, usernames and IP range:<\/p>\n<pre>[Global]\r\n mimic model = TimeCapsule6,106\r\n log level = default:warn\r\n log file = \/var\/log\/afpd.log\r\n# either individual or CIDR\r\n hosts allow = 196.168.100.0\/24\r\n\r\n# I didn't require this option\r\n#[Homes]\r\n#basedir regex = \/home\r\n\r\n[TimeMachine]\r\n path = \/mnt\/data\/timecapsule\/\r\n valid users = me you someone\r\n time machine = yes\r\n appledouble = ea\r\n\r\n\r\n# Nor did I require this.\r\n#[Shared Media]\r\n# path = \/mnt\/data\/torrents\/\r\n# valid users = me you someone<\/pre>\n<p>Obviously, don't forget to create\u00a0the mount point.<\/p>\n<pre>mkdir \/mnt\/data\/timecapsule<\/pre>\n<p>Set the correct perms<\/p>\n<pre>chmod 775 \/mnt\/data\/timecapsule<\/pre>\n<p>You will also need to change the group as this will currently be root:root<\/p>\n<pre>chown -R root.user \/mnt\/data\/timecapsule<\/pre>\n<p>or<\/p>\n<pre>chgrp -R user \/mnt\/data\/timecapsule<\/pre>\n<p><strong>Create &amp; Format the destination filesystem<\/strong><\/p>\n<p>Create the partition.<br \/>\n(I just used the whole 1Tb disk)<\/p>\n<pre># fdisk \/dev\/sdb<\/pre>\n<p>Once the partition is defined, set the filesystem type of af.<\/p>\n<pre>Disk \/dev\/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0xb59eb59e\r\n\r\nDevice Boot Start End Sectors Size Id Type\r\n\/dev\/sdb1 2048 1953525167 1953523120 931.5G af HFS \/ HFS+<\/pre>\n<p>Install the tool for formatting the filesystem.<\/p>\n<p>Version 332.14_p1 at the time of writing.<\/p>\n<pre>emerge -av diskdev_cmds<\/pre>\n<p>Then format it<\/p>\n<pre>mkfs.hfsplus -v timemachine \/dev\/sdb1<\/pre>\n<p>Automount at boot time. \u00a0Add it to \/etc\/fstab<\/p>\n<pre>\/dev\/sdb1 \/mnt\/data\/timecapsule hfsplus rw,noatime,user 0 1<\/pre>\n<p>Now mount it.<\/p>\n<pre>mount -a<\/pre>\n<p>Start the netatalk daemon. (I use systemd)<\/p>\n<pre>systemctl start netatalk<\/pre>\n<p>If all went to plan, the filesystem is mounted and the netatalk daemon running. \u00a0On the Mac, when you open Timemachine, you should automagically see your server.<br \/>\nSelect it and enter the account details. \u00a0For security reasons, I created a new user on the server and set \/sbin\/nologin as the shell. \u00a0This way, the user has no access to the server and is not privileged to do anything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TIME CAPSULE INSTALL &amp; SETUP Install Netatalk # emerge -av netatalk net-fs\/netatalk-3.1.6::gentoo USE=\"(acl) avahi cracklib dbus pam samba shadow ssl tcpd utils -debug -kerberos -ldap -pgp -quota -static-libs -tracker\" PYTHON_TARGETS=\"python2_7\" Configure Netatalk Edit the file \/etc\/afp.conf: vi \/etc\/afp.conf Place the following contents. Edit the paths, usernames and IP range: [Global] mimic model = TimeCapsule6,106 log &hellip; <a href=\"https:\/\/cdblog.cdstealer.com\/?p=1176\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Timecapsule on Linux<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[234,213,18,235,237,236],"class_list":["post-1176","post","type-post","status-publish","format-standard","hentry","category-gentoo","tag-apple","tag-gentoo","tag-linux","tag-mac","tag-timecapsule","tag-timemachine"],"_links":{"self":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1176"}],"version-history":[{"count":5,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1176\/revisions"}],"predecessor-version":[{"id":1182,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=\/wp\/v2\/posts\/1176\/revisions\/1182"}],"wp:attachment":[{"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cdblog.cdstealer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}