Based on https://mudge.name/2019/11/12/using-a-raspberry-pi-for-time-machine/.
sudo apt install samba
lsblk
FORMAT
sudo mkfs -t ext4 /dev/sda
MOUNT ON BOOT
echo 'UUID=7b6e6927-ee45-4e85-9d1d-712999f7e4fc /media ext4 noexec,nodev,noatime,nodiratime 0 0' | sudo tee -a /etc/fstab
SET SPINDOWN
sudo apt install hdparm
sudo nano /etc/hdparm.conf
/dev/disk/by-uuid/7b6e6927-ee45-4e85-9d1d-712999f7e4fc {
spindown_time = 120
}
SAMBA STUFF
sudo mkdir /media/backups
sudo apt install samba
sudo nano /etc/samba/smb.conf
[backups]
comment = Cherry
path = /media/backups
valid users = pi
read only = no
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
sudo service smbd reload