In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how MAC and raspberry pie achieve file sharing and TM backup. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Use netatalk to let Linux share files with Mac OS X
Build Time Machine backup server for Mac
The Mac OS X system comes with an easy-to-use backup software, Time Machine, which can back up incremental backups every hour (that is, only documents with changes), so if you use a MacBook Pro/Air laptop and need to deal with a lot of documents, then using Time Machine to back up over a wireless network is a good choice. Unfortunately, using Time Machine requires an external hard drive or buying an Apple Time Capsule device, and the following way is to install netatalk software so that a regular Linux raspberry pie can share files with Mac OS X and act as a backup server for Time Machine.
1. Install netatalk for raspberry pie
Netatalk is a free and open source implementation of the AppleTalk communication protocol, through which Linux or BSD systems can act as Mac file servers (AppleShare File Server, network protocols are AFP), AppleTalk routing, print servers, and so on.
# install netatalk using the following command
Sudo apt-get install netatalkpi@raspberrypi ~ $sudo apt-get install netatalkReading package lists... DoneBuilding dependency tree Reading state information... DoneThe following extra packages will be installed: avahi-daemon bind9-host cracklib-runtime db-util db5.1-util libavahi-core7 libbind9-80 libcrack2 libdns88 libisc84 libisccc80 libisccfg82 liblwres80 libnss-mdns libpam-cracklib lsof rc wamericanSuggested packages: avahi-autoipd texlive-base-bin groff quota db4.2-utilThe following NEW packages will be installed: avahi-daemon bind9-host cracklib-runtime db-util db5.1-util libavahi-core7 libbind9-80 libcrack2 libdns88 libisc84 libisccc80 libisccfg82 liblwres80 libnss-mdns libpam-cracklib lsof netatalk rc wamerican0 upgraded, 19 newly installed 0 to remove and 1 not upgraded.Need to get 4056 kB of archives.After this operation, 9783 kB of additional disk space will be used.Do you want to continue [Y/n]? Y
2. Set up a shared folder
Edit a file
Sudo nano / etc/netatalk/AppleVolumes.default
Each line here represents a shared folder, and the current user's $HOME folder is shared by default. If you don't want to do so, find the "~" line and comment it out, adding the following line:
/ home/pi/nas "CohoStudio_NAS"
This means sharing the / home/pi/nas folder with the name "CohoStudio_NAS".
3. Set up the Time Machine backup folder
Similar to the previous step, just add the parameter "options:tm" after the sharing settings, such as (create a time_capsule under the nas folder):
/ home/pi/nas/time_capsule "Time_Capsule" options:tm
4. Install and configure Avahi
Avahi is an open source implementation of the Apple's Zeroconf protocol that implements Bonjour-like functions that allow you to automatically discover your Linux computer in the Mac system.
Sudo apt-get install avahi-daemon (optional to support automatic discovery of computers on the network)
Create a file
Sudo nano / etc/avahi/services/afpd.service
Write the following (Port:548): (this file already exists in Archlinux and does not need to be created)
% h_afpovertcp._tcp548_device-info._tcp0model=Xserve
5. Start netatalk and avahi
$sudo service netatalk restart$ sudo service avahi-daemon restart
The default 2345 is on, so the following two commands are not necessary.
Pi@cohostudio ~ $sudo chkconfig-- add netatalkinsserv: warning: script 'K01aria2' missing LSB tags and overridesinsserv: warning: script' aria2' missing LSB tags and overridesinsserv: warning: script 'mathkernel' missing LSB tags and overridesnetatalk 0:off 1:off 2:on 3:on 4:on 5:on 6:offpi@cohostudio ~ $sudo chkconfig-- add avahi-daemoninsserv: warning: script' K01aria2' missing LSB tags and overridesinsserv: warning: script 'aria2' missing LSB tags and overridesinsserv: warning: script 'mathkernel' missing LSB tags and overridesavahi-daemon 0:off 1:off 2:on 3:on 4:on 5:on 6:offpi@raspberrypi ~ / nas $sudo service netatalk restartRestarting Netatalk Daemons (this will take a while) Stopping Netatalk Daemons: afpd cnid_metad papd timelord atalkd...Starting Netatalk services (this will take a while): cnid_metad afpd.done.pi@raspberrypi ~ / nas $sudo service avahi-daemon restart [ok] Restarting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
MAC connects to the AFP service on LINUX
Enter the user name pi and password of the linux system to log in.
6. Settings on Mac OSX system
Right-click "Finder"-> "Connect to the server …" -> "server address". After logging in with the account and password in the Linux system, you should see the "CohoStudio_NAS" and "Time_Capsule" folders.
Afp://xxxx.jios.org # AFS server address
Then open a terminal in Mac (located in applications-> Utilities-> Terminal), and execute this command so that Time Machine can use the network disk as the backup destination:
Defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Open system preferences-> Time Machine-> Open-> Select disk and select the Time Machine folder.
Now that all the settings are complete, let's test it.
7. Backup the MAC system to the raspberry pie
Click the Time Machine icon on the menu bar, and then click "backup now". If there is no problem, you should start backing up files (generally speaking, you can only back up user files, that is, you can exclude all system files). The first backup takes a long time, so it's best to turn on the alternating current and set the energy saver to never go to sleep.
Thank you for reading! This is the end of the article on "how MAC and raspberry pie achieve file sharing and TM backup". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.