Time Machine
Ubuntu Time Machine designs
AFP Time Machine 10.8
This is closer to what an Airport Base Station would do
Framework - Ubuntu (Precise) 12.10, OSX 10.8
apt-get install netatalk avahi-daemon libssl-dev libnss-mdns
- /etc/netatalk/AppleVolumes.default
You must manually create dbpath directory
# Netatalk defaults applied to shares :DEFAULT: options:upriv,usedots cnidscheme:dbd dbpath:/var/dbd/AppleDB/$v allowed_hosts:192.168.0.0/24 # Time Machine volume /var/local/storage/TimeMachine "Time Machine" volsizelimit:1000000 allow:username,username2,@timemachine options:usedots,upriv,tm
- /etc/netatalk/afpd.conf
# Default AFP server "areus" -tcp -noddp -nosavepassword -nosetpassword -nodebug -nouservolfirst -nouservol -closevol \ # -fqdn server.mydomain [optional] \ -mimicmodel AirPort \ -ipaddr 192.168.0.254 \ -port 548 \ -unixcodepage utf8 \ -volnamelen 255 \ -uampath /usr/lib/netatalk \ -uamlist uams_dhx.so,uams_dhx2_passwd.so,uams_guest.so \ -defaultvol /etc/netatalk/AppleVolumes.default \ -systemvol /etc/netatalk/AppleVolumes.system \ -sleep 168 # AFPd Logging - -setuplog "AFPDaemon log_info /var/log/netatalk/afpd.log" \ -setuplog "UAMSDaemon log_info /var/log/netatalk/uams.log" \ -setuplog "Default log_info /var/log/netatalk/netatalk.log"
- /etc/default/netatalk
# Netatalk configuration ######################################################################### # Global configuration ######################################################################### #### machine's AFPserver/AppleTalk name. #ATALK_NAME=machinename #### server (unix) and legacy client (<= Mac OS 9) charsets ATALK_UNIX_CHARSET='LOCALE' ATALK_MAC_CHARSET='MAC_ROMAN' #### Don't Edit. export the charsets, read form ENV by apps export ATALK_UNIX_CHARSET export ATALK_MAC_CHARSET ######################################################################### # AFP specific configuration ######################################################################### #### Set which daemons to run. #### If you use AFP file server, run both cnid_metad and afpd. CNID_METAD_RUN=yes AFPD_RUN=yes #### maximum number of clients that can connect: #AFPD_MAX_CLIENTS=20 #### UAMs (User Authentication Modules) #### available options: uams_dhx.so, uams_dhx2.so, uams_guest.so, #### uams_clrtxt.so(legacy), uams_randnum.so(legacy) #AFPD_UAMLIST="-U uams_dhx2.so,uams_clrtxt.so" AFPD_UAMLIST="-U uams_dhx2_passwd.so,uams_guest.so" #### Set the id of the guest user when using uams_guest.so AFPD_GUEST=nobody #### config for cnid_metad. Default log config: CNID_CONFIG="-l log_note" ######################################################################### # AppleTalk specific configuration (legacy) ######################################################################### #### Set which legacy daemons to run. #### If you need AppleTalk, run atalkd. #### papd, timelord and a2boot are dependent upon atalkd. ATALKD_RUN=no PAPD_RUN=no TIMELORD_RUN=no A2BOOT_RUN=no #### Control whether the daemons are started in the background. #### If it is dissatisfied that legacy atalkd starts slowly, set "yes". #### In case using systemd/systemctl, this is not so significant. ATALK_BGROUND=no #### Set the AppleTalk Zone name. #### NOTE: if your zone has spaces in it, you're better off specifying #### it in atalkd.conf #ATALK_ZONE=@zone
AFP Time Machine 10.6
This is closer to what an Airport Base Station would do
Framework - Ubuntu (Natty) 11.04, OSX 10.5.3 or 10.6
apt-get install netatalk avahi-daemon libssl-dev libnss-mdns
Netatalk Configuration
nano /etc/default/netatalk
ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no
nano /etc/netatalk/afpd.conf
- - transall -uamlist uams_randnum.so,uams_dhx2.so -nosavepassword -advertise_ssh
Make directory to store your backups, make it at least the size of the current hard disk on client machine.
mkdir /var/local/storage/TimeMachine
Fix Permissions
chmod 777 /var/local/storage/TimeMachine
Create Apple file to be read
touch /var/local/storage/TimeMachine/.com.apple.timemachine.supported
nano /etc/netatalk/AppleVolumes.default
/home/username/TimeMachine TimeMachine allow:username1 cnidscheme:dbd options:usedots,upriv
Restart the service
service netatalk restart
Avahi Daemon
This will announce the Apple File Share
nano /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns
nano /etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=Xserve</txt-record> </service> </service-group>
Restart Avahi
service avahi-daemon restart
Client Machine Setup
In order for OSX to use a disk for backup that isn't local the following command is required.
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Time Machine Full Restore
In case of a full system restore you would have to boot your Mac from the Mac OS X
installation DVD (the one delivered with your Mac) by pressing the c key during boot. Your Mac will start with
a minimal UI where you have a Utilities section in the top menu bar. There you’ll find “Restore from a Time Machine
Backup” but it won’t find your network share with your Time Machine backup. Luckily Dmitry Nedospasov found a way
to manage this by simply mounting your Time Machine network share with the Terminal (which you can find under
Utilities in the menu bar too) by utilizing the following syntax:
mount -t afp afp://username:password@hostname/ShareName /Volumes/ShareMount
credit to:
http://talklikeaduck.denhaven2.com/2010/07/19/ubuntu-timemachine-server-for-snow-leopard http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
iSCSI Time Machine
I tried this setup, it works, but has a lot of room for error and a client application has to be installed/ran on the client OSX machine.
Prerequisite
apt-get install iscsitarget
/etc/ietd.conf
# "iSNSServer" is the iSNS server you want your portal to register
# with.
ADDRESS="192.168.0.254"
Target iqn.2010-02.net.hurlster:storage.sdb2
#IncomingUser someuser secret
#OutgoingUser
Lun 0 Path=/dev/sdc2,Type=fileio
Alias LUN1
#MaxConnections 6