Skip to content

Instantly share code, notes, and snippets.

@helloimalemur
Forked from betweenbrain/mac-linux-nfs.md
Last active December 18, 2023 23:34
Show Gist options
  • Save helloimalemur/34e8367352c600bac2d9f8cb82b914c3 to your computer and use it in GitHub Desktop.
Save helloimalemur/34e8367352c600bac2d9f8cb82b914c3 to your computer and use it in GitHub Desktop.
Mac backup to Linux NFS via Time Machine

Server

apt update
apt install nfs-kernel-server
mkdir /mnt/nfs -p
chown nobody:nogroup /mnt/nfs
chmod 777 /mnt/nfs
nano /etc/exports

Add line-item for client in /etc/exports, where 192.168.88.253/32 is your client's ip address/CIDR

/mnt/1TB/nfs 192.168.88.253/32(rw,sync,no_subtree_check)
systemctl restart nfs-kernel-server

Client

mkdir /private/nfs
mount -vvvv -t nfs -o rw,sync 192.168.88.252:/mnt/1TB/nfs /mnt/spinach_nfs/

fstab

192.168.88.252:/mnt/1TB/nfs	/mnt/spinach_nfs/	nfs	_netdev,defaults	0 0

Create disk image using Disk Utilities, mount it.

tmutil setdestination /Volumes/MacBackup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment