laitimes

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Originally, I used the desktop to directly insert a mobile hard disk to do the time machine, the notebook thought that it was not convenient to insert a hard disk all the time, so I did not do the time machine. As a result, when the double 11 bought a thunderbolt 3 magnetic head, the motherboard was burned to me, all the data was lost, in order to prevent data loss again, so it cost a lot of money to buy a Raspberry Pi 4B with usb 3.0 and gigabit network card to make a wireless time machine.!_!

This tutorial is divided into the following three steps, long text and many pictures, if the front-end steps you have already mastered, please jump to the corresponding steps

The first step is for the Raspberry Pi to install the operating system

The second step is to mount the portable hard disk

The third step is to use the Raspberry Pi Time Machine for backup

<h1 class="pgc-h-arrow-right" > the first step, the Raspberry Pi installs the operating system</h1>

Go to the Official Website of the Raspberry Pi to download the Raspberry Pi system image writing tool, and open it after the writing tool is installed, as shown in the following figure

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Raspberry Pi system write tool

Click CHOOSE OS to select the operating system to install, I choose Ubuntu Server 20.04.1 LTS here (LTS means Long Term Support, long-term support, this version of the system will generally be more stable and secure)

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Select the operating system

After selecting the operating system, insert the SD card into the computer with the card reader, click THE CHOICE SD CARD to select the memory card

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Select the SD card you want to write to the system

Click ON WRITE, prompt "All data in the card will be cleared, do you want to continue", click YES.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Click YES

Enter the administrator password and Raspberry Pi Imager will automatically download the corresponding operating system and write the system image to the selected memory card.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Enter the administrator password

Depending on the network and memory card speed, the write may take 10 to 20 minutes.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Writing to system

After the mirror write is complete, the integrity of the written data is automatically verified.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Verifying the system

After the verification is complete, click CONTINUE, and then you can unplug the memory card and plug it into the Raspberry Pi.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

The mirror writes and verifies that it is complete

Connect the Raspberry Pi to the computer on the same router using the network cable, and the Raspberry Pi will automatically turn on the power supply. After booting, go to the management background of the router to see what the IP address of the Raspberry Pi is.

Open the terminal, enter the ssh ubuntu@ip address, at the beginning of the default is to use the certificate to verify the login, will prompt the login failure, after several attempts the system will automatically change to password login.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

After trying it a few times, a prompt similar to the one below that lets you enter your password will appear, enter ubuntu, and enter.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

After entering the system for the first time, you will be asked to modify the default password, enter ubuntu once, enter the car, then let you enter the new password, enter the new password twice, automatically log out, and log back in with the new password.

<h1 class="pgc-h-arrow-right" > the second step, mount the removable hard disk</h1>

The capacity of the general SD is definitely not able to meet our long-term backup needs, at this time we need to use a mobile hard disk as a backup hard disk.

Plug the mobile hard disk into the Raspberry Pi, if you do not plug in other storage devices on the Raspberry Pi in addition to the system card, all the devices of the mobile hard disk should be /dev/sda, and the corresponding devices of each partition are /dev/sda1, /dev/sda2 and so on. The number after sda represents each partition of your hard disk.

Use the following command to mount the partition that needs to be backed up to the system.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

After the mount is completed, use the df -h command to see if the mount information such as the above figure appears, and if so, prove that the mount is successful, and you can proceed to the next step.

<h1 class="pgc-h-arrow-right" > the second step, install the service packs needed to do Time Machine</h1>

Making Time Machine requires the installation of two packages, netatalk and avahi-daemon, which can be installed using the following command.

After the installation is complete, Time Machine cannot be used, you need to modify the configuration file, the path where the configuration file is saved. Use the following command to modify the configuration file.

Press i to enter edit mode and add the following

Press esc to exit edit mode, press :wq to save and exit.

Use the following command to restart the netatalk and avahi services

At this point, you can search for the hard disk on Ubuntu in time machine.

<h1 class="pgc-h-arrow-right" > the third step, using the Raspberry Pi Time Machine for backup</h1>

Open Time Machine and click Select Disk.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Select the disk we just configured and click Use Disk

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

Here will pop up to let you enter the user name and password, the user name is ubuntu (if you configure other users, fill in the corresponding user name), the password is the password corresponding to the user name on the Raspberry Pi.

Enter the user name password after entering, will start to connect, after the connection is successful, it will automatically start to use the Raspberry Pi backup, and then as long as the Raspberry Pi is running, the computer and the Raspberry Pi will be automatically backed up after connecting to the same network, no need to plug, no need to manually operate, all this is automatic, if needed later, files can even include the operating system can be restored to any time.

From now on the files on the Mac will never be lost again, I teach you to use the Raspberry Pi to do the first step of wireless time machine, the raspberry Pi to install the operating system the second step, mount the mobile hard disk second step, install the service pack required to do time machine step three, use the Raspberry Pi time machine for backup

For more Mac, Linux, Windows, and programming related issues, please follow me

Read on