I have another laptop I want to backup using my Time Capsule jail.
Here are the step I used.
Create a Unix User
I have no idea if I need to do this. But I did.
But now, I’m thinking, it is not required, at all. But read on, I think I’ll show you where I use it.
[21:56 tm dvl ~] % sudo adduser Username: dvl-pro04 Full name: For backing up pro04 Uid (Leave empty for default): Login group [dvl-pro04]: Login group is dvl-pro04. Invite dvl-pro04 into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash zsh rzsh nologin) [sh]: Home directory [/home/dvl-pro04]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Lock out the account after creation? [no]: no Username : dvl-pro04 Password : ***** Full Name : For backing up pro04 Uid : 1013 Class : Groups : dvl-pro04 Home : /home/dvl-pro04 Home Mode : Shell : /bin/sh Locked : no OK? (yes/no) [yes]: yes adduser: INFO: Successfully added (dvl-pro04) to the user database. Add another user? (yes/no) [no]: no Goodbye! [21:58 tm dvl ~] %
Create the Samba user
I created the Samba User (I know this is needed; you supply these creds at System Setting | Time Machine):
[21:58 tm dvl ~] % sudo smbpasswd -a dvl-pro04 New SMB password: Retype new SMB password: Added user dvl-pro04. [22:03 tm dvl ~] % sudo ls -l /var/db/samba4/private total 115 drwx------ 2 root wheel 8 Feb 16 21:58 msg.sock -rw------- 1 root wheel 421888 Feb 16 22:03 passdb.tdb -rw------- 1 root wheel 430080 Nov 9 19:45 secrets.tdb
I checked the date/time on that password file; it matched when I ran the command.
Create the ZFS dataset
This is done on the host, not the Time Machine jail.
[22:04 r730-03 dvl ~] % zfs list -r data01/timemachine NAME USED AVAIL REFER MOUNTPOINT data01/timemachine 1.66T 15.1T 104K /jails/tm/usr/local/timemachine data01/timemachine/dvl-air01 608G 142G 412G /jails/tm/usr/local/timemachine/dvl-air01 data01/timemachine/dvl-pro02 540G 960G 468G /jails/tm/usr/local/timemachine/dvl-pro02 data01/timemachine/dvl-pro03 552G 198G 523G /jails/tm/usr/local/timemachine/dvl-pro03 [22:04 r730-03 dvl ~] % zfs create data01/timemachine/dvl-pro04 cannot create 'data01/timemachine/dvl-pro04': permission denied [22:04 r730-03 dvl ~] % sudo zfs create data01/timemachine/dvl-pro04 [22:04 r730-03 dvl ~] % zfs list -r data01/timemachine NAME USED AVAIL REFER MOUNTPOINT data01/timemachine 1.66T 15.1T 104K /jails/tm/usr/local/timemachine data01/timemachine/dvl-air01 608G 142G 412G /jails/tm/usr/local/timemachine/dvl-air01 data01/timemachine/dvl-pro02 540G 960G 468G /jails/tm/usr/local/timemachine/dvl-pro02 data01/timemachine/dvl-pro03 552G 198G 523G /jails/tm/usr/local/timemachine/dvl-pro03 data01/timemachine/dvl-pro04 96K 15.1T 96K /jails/tm/usr/local/timemachine/dvl-pro04 [22:04 r730-03 dvl ~] %
Set permission
Back in the Time Machine jail.
This, this is where I need those Unix users.
[22:08 tm dvl /usr/local/timemachine] % ls -l total 74 drwxr-xr-x 3 dvl-air01 dvl-air01 5 2024.02.16 12:13 dvl-air01/ drwxr-xr-x 3 dvl-pro02 dvl-pro02 5 2024.02.16 21:23 dvl-pro02/ drwxr-xr-x 3 dvl-pro03 dvl-pro03 4 2024.02.16 12:52 dvl-pro03/ drwxr-xr-x 2 root wheel 2 2024.02.16 22:04 dvl-pro04/
One of these things is not like the others.
[22:08 tm dvl /usr/local/timemachine] % sudo chown dvl-pro04:dvl-pro04 dvl-pro04 [22:09 tm dvl /usr/local/timemachine] % ls -l total 74 drwxr-xr-x 3 dvl-air01 dvl-air01 5 2024.02.16 12:13 dvl-air01/ drwxr-xr-x 3 dvl-pro02 dvl-pro02 5 2024.02.16 21:23 dvl-pro02/ drwxr-xr-x 3 dvl-pro03 dvl-pro03 4 2024.02.16 12:52 dvl-pro03/ drwxr-xr-x 2 dvl-pro04 dvl-pro04 2 2024.02.16 22:04 dvl-pro04/ [22:09 tm dvl /usr/local/timemachine] %
There. I fixed it.
Done
Now the backups should just work.