Thanks for watching my video, in the following document you will find all the commands you need to get your Raspberry Time Machine running.
Installing gparted
sudo apt-get install gparted
Enter your Pi via VNC or control it locally and enter "Run..." and enter:
sudo gparted
Create a EXT4 partition. Continue with creating a mounting folder.
sudo mkdir /mnt/TimeMachine sudo chmod 777 /mnt/TimeMachine
Find out your partition's UUID with this commend:
sudo blkid
Edit /etc/fstab with this command:
sudo nano /etc/fstab
And create a new line with your UUID and the following parameters:
UUID=YourUUIDHere /mnt/TimeMachine ext4 nofail,defaults 0 2
Installing dependencies
sudo apt-get install build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libmariadbclient-dev libtracker-miner-1.0-dev
Download Netatalk sources and extract
wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.11.tar.gz sudo tar -xf netatalk-3.1.11.tar.gz
Prepare configuration by pasting this (all the lines) into your terminal:
./configure \ --with-init-style=debian-systemd \ --without-libevent \ --without-tdb \ --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=1.0
Compile and install:
make sudo make install
Edit nsswitch:
sudo nano /etc/nsswitch.conf
In this file, you want to go to the end of the hosts line and append:
mdns4 mdns
Enabling autostart:
sudo systemctl enable avahi-daemon sudo systemctl enable netatalk sudo service avahi-daemon start sudo service netatalk start
Edit afp.conf
sudo nano /usr/local/etc/afp.conf
Under [Global], you want to add:
mimic model = TimeCapsule6,106
And at the end of the file, uncomment all the lines concerning Time Machine so it looks like this:
[YourCustomName] path = /mnt/TimeMachine time machine = yes valid users = pi
Mount the drive and edit permissions:
cd /mnt sudo mount -a sudo chown -R pi:pi TimeMachine
Restart the services for finishing configuration:
sudo service avahi-daemon restart sudo service netatalk restart
In your Mac, go to System Preferences, Time Machine, Select Backup Disk and select the newly created drive.
Log in with your pi user and its password.
That's it!