맥용_time_machine_만들기_3편
맥용 Time Machine 만들기
macOS Tahoe 26 부터 타임머신을 쓰는 사람들에게 경고 메시지를 보이고 있다.
대충 요약하면, 기존에 타임머신 백업은 지원하지만, 26부터는 AFP 를 통한 새로운 백업 생성이 안된다. 라는 메시지다. 그리고 다음버전부터는 AFP 백업을 이용할 수 없다는 내용이 추가 된다.
안되면 되게 해야지… samba 를 쓰면 된다.
samba 설치
sudo apt install samba
samba 에 사용자 등록을 하면 되는데, 우분투 계정으로 로그인한 후,
sudo smbpasswd -a USER_ID
이다. USER_ID 에 자신의 계정명을 적으면 된다. 아래에 있는 설정 파일과 명령어에도 마찬가지다.
samba 설정 파일 수정
/etc/samba/smb.conf 인데, vim 이나 nano 든 손에 익은 걸로 수정하면 된다. 다만, root 권한이 필요하므로, sudo vim /etc/samba/smb.conf 나 sudo nano /etc/samba/smb.conf 로 하면 된다. (뭐 손에 익은 거 쓰면 된다. emacs 든 ex 든 ..)
sudo vim /etc/samba/smb.conf
또는
sudo nano /etc/samba/smb.conf
#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = server
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
# usershare allow guests = yes
min protocol = SMB2
vfs objects = catia fruit streams_xattr
fruit:metadata = stream
fruit:resource = stream
fruit:locking = none
fruit:encoding = native
# Time Machine 관련 설정
fruit:model = MacSamba
fruit:time machine = yes
[USER_ID]
comment = USER_ID
path = /home/USER_ID
browseable = no
read only = no
create mask = 0755
directory mask = 0755
valid users = USER_ID
[TIme Machine]
path = /home/USER_ID/timemachine
valid users = USER_ID
read only = no
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
# fruit:time machine max size = 1000G
로그인한 김에, 홈디렉터리에 timemachine 라는 디럭터리를 하나 만들면 된다.
이제, samba 서버가 자동으로 시작하도록 하자.
sudo systemctl enable smbd.service [sudo] password for USER_ID: Synchronizing state of smbd.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable smbd
비밀번호 한번 더 입력해주면 된다. 삼바 설치하고, 설정 파일 바꾸느라 sudo 명령을 사용한지 몇분 안 됐다면 안 물어볼 수도 있다.
이제 다 됐다.
다만, 아직 설정이 최적화가 안돼서인지 가끔 백업을 끝까지 못했다는 메시지가 나올 때가 있는데, 대개는 잘 된다.
2025.01.19 akpil
맥용_time_machine_만들기_3편.txt · 마지막으로 수정됨: 저자 akpil
