netatalk を更新した
mac のタイムマシンに samba が使えるのは知ってるんだけど、ずっとnetatalk なので引き続き使ってます。いまのところ特に問題ないし、現代のsambaは設定が煩雑すぎて目的を見失って沼に嵌りそうですし。
過去記事
netatalkでLinuxサーバーをNAS TimeCapusleサーバーにする。 - それマグで!
インストール
cd /usr/local/src curl -LJO 'http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.12.tar.bz2?download' tar jxvf netatalk-3.1.12.tar.bz2 cd netatalk-3.1.12 sudo apt -y install \ build-essential \ libssl-dev \ libgcrypt*-dev \ libkrb5-dev \ libpam0g-dev \ libwrap0-dev \ libdb-dev \ libtdb-dev \ default-libmysqlclient-dev \ libavahi-client-dev \ libacl1-dev \ libldap2-dev \ libcrack2-dev \ systemtap-sdt-dev \ libdbus-1-dev \ libdbus-glib-1-dev \ libglib2.0-dev \ tracker \ libtracker-sparql*-dev \ libtracker-miner-*-dev ./configure \ --with-init-style=debian-systemd \ --with-libevent=no \ --with-cnid-tdb-backend=no \ --with-tdb=no \ --with-cracklib \ --enable-krbV-uam \ --with-pam-confdir=/etc/pam.d \ --with-dbus-daemon=/usr/bin/dbus-daemon \ --with-dbus-sysconf-dir=/etc/dbus-1/system.d \ --with-tracker-pkgconfig-version=2.0 sudo dpkg -r netatalk3.1.11 sudo checkinstall \ --pkgname=netatalk3.1.12 \ --pkgversion="1:$(date +%Y%m%d%H%M)" \ --backup=no \ --deldoc=yes --fstrans=no --default sudo systemctl daemon-reload sudo systemctl status netatalk sudo systemctl start netatalk sudo systemctl status netatalk
設定ファイルをリンク作成
etc に持ってきておく
sudo ln -s /usr/local/etc/afp.conf /etc/afp.conf sudo ln -s /etc/afp.conf /etc/netatlk.conf
afp.conf で有ることを忘れるので netatalk.conf にしておく
afp.conf
[Global] uam list = uams_dhx.so uams_dhx2_passwd.so mac charset = MAC_JAPANESE hostname = acid-afp vol preset = default_for_all_volumes log file = /var/log/netatalk.log #log level = default:maxdebug log level = default cnid scheme = cdb dbus daemon = /usr/bin/dbus-daemon mimic model = MacPro ;mimic model = RackMac dsireadbuf = 120 ; default 12 dircachesize = 16384 [default_for_all_volumes] file perm = 0600 directory perm = 0700 [Homes] basedir regex = /home follow symlinks = true time machine = no spotlight = true home name = $u's home(afp) [My Time Machine Volume] path = /home/takuya/.backups/time_capsule/ time machine = yes vol size limit = 450000