Try using a Linux server as a backup destination for Time Machine (Ver. 2020)

This article is a 12/15 minute article of Ryukyu Advent Calendar 2020. (And this is the 2020 Ver. Of the 12/21 minute article of Ryukyu Advent Calender 2019.

It's scary because it's likely to happen from this time to the end of the year.

-** PC breaks while writing a treatise or report ** -** I cleaned the garbage files on my PC and accidentally deleted the necessary files **

For Mac, by backing up with Time Machine, you can restore files from the backup in such cases. It's okay if you always connect the external HDD, but it's troublesome to always connect, so I want you to connect via the network. You can even back up your Mac just by connecting it to the internet ...

What you need to back up over the network with Time Machine

--Unix / Linux server --More storage than your Mac --Samba version 4.8 or later

Regarding the hardware side, if you have done a home server or have a PC left in the laboratory, I think that there are many people who already have this environment in place. (If you use a Raspberry Pi or something, you can change for 10,000 yen ... Regarding software, it is cleared for CentOS 7 or later for CentOS and 20.04 LTS or later for Ubuntu. (For Ubuntu 18.04 LTS, I think it's okay to use a docker image whose image base is ubuntu: focal or alpine: latest.)

By the way, last year's article introduced the method using AFP (netatalk), but Apple recommends ** using SMB (Samba) after August 2018 **. (Apple removes AFP from network volumes that support Time Machine backup and changes to NAS with "Time Machine over SMB". | AAPL Ch.)

Make Samba Time Machine compatible

  1. Install avahi (run sudo yum install avahi, sudo apt install avahi-daemon, etc.) and enable it

  2. Install Samba (run sudo yum install samba, sudo apt install samba, etc.)

  3. Change the configuration file

The settings to add are as follows

[TimeMachine over SMB]   #Display name in Explorer or Finder
   comment = TimeMachine Folder   #comment
   path = /mount/backup  #Destination
   writable = Yes        #Allow to write
   browsable = Yes       #Display in Windows Explorer etc.
   fruit:time machine = Yes   #Enable Time Machine
   fruit:time machine max size = 1T   #Maximum capacity used by Time Machine

After saving, restart samba Then follow the steps in the Apple Support Articles (https://support.apple.com/ja-jp/HT201250) to set it up.

Finally

Tomorrow's charge will be Hardwolf.

Recommended Posts

Try using a Linux server as a backup destination for Time Machine (Ver. 2020)
Let's try Linux for the first time
Try using your Android device as an audio receiver for your Linux desktop
Try using LINE Notify for the time being
Try face detection in real time using a webcam
Memo for building a machine learning environment using Python
Avoiding the pitfalls of using a Mac (for Linux users?)
Try a similar search for Image Search using the Python SDK [Search]
I tried using Tensorboard, a visualization tool for machine learning
For the time being, try using the docomo chat dialogue API
Time measurement using a clock
[Python machine learning] Recommendation of using Spyder for beginners (as of August 2020)
Try using virtualenv, which can build a virtual environment for Python
Set up Ubuntu as a Linux cheat sheet and https server
Try using Elasticsearch as the foundation of a question answering system
Host the network library Mirror for Unity on a Linux server
Try using FireBase Cloud Firestore in Python for the time being
What I stumbled upon when using CodeIgniter on a Linux server