OSX's Time Machine backup to a Linux Server
I have a server based backup solution, that run quite well. Because I was curious to see the apple desktop solution, I looked around and saw many people talking about deficiencies especially in network functionality. That's why I wanted to draw my own conclusions about the situation with OSX 10.7.2 Lion. Result: It works like a charm in combination with opensource AFP-server "netatalk". But beforehand I made the attempt to get it done with NFS.
NFSIn the first place I've choosen NFS because of its well known transfer rate. Although "Time Machine" recognizes the NFS volume in the first place it quits the backup process afterwards due to incompatibilities: "afpfs fsctl failed to read settings: 25 Inappropriate ioctl for device" And yes, I did the sparse bundle trick mentioned later in this text, but "Time Machine" didn't recognize it due to filesystem restrictions I think.
Linux ConfigurationOn my linux box I've installed netatalk 2.2 and looked through the manuals and configuration files available: Edit /etc/netatalk/afpd.conf and add or replace the last line in file: - -tcp -noddp -uamlist uams_dhx.so,uams_dhx2_passwd.so -nosavepassword At the end of /etc/netatalk/AppleVolumes.default you have to fill out the path to your backup space and adjust some options: /path/to/your/backupspace name allow:username cnidscheme:dbd options:tm "name" is the name of the backup volume how you see it on your mac. "username" means the user with which the mac will identify on the server. Therefor the user also have to exist on the server with the same password. The AFP server needs "avahi" for the zeroconf protocol. For zeroconf to work properly we need to change: /etc/sysctl.conf # Turn off source route verification net.ipv4.conf.default.rp_filter = 0 # Disable source validation by reversed path (RFC1812) net.ipv4.conf.all.rp_filter = 0 Both variables turn off source IP address verification. That's not nice because these settings are recommended for a security hardened system. My reaction was: Oh Apple, what have you done. You are drilling a hole in my system? Disabling source route verification is not state of the art but supposed to be necessary for zeroconf. The server's network adapter has to be in promiscuous mode. >> ifconfig eth0 promisc
Mac configurationThe good news first: You do not need to hack your system anymore when you are connecting to netatalk-2.2.Just in case you need to undo the DHCAST128-hack you have to add "DHCAST128" to the list of disabled authentication methods again. You have the choice to delete the file "/Library/Preferences/com.apple.AppleShareClient" or to launch the following command:sudo defaults write /Library/Preferences/com.apple.AppleShareClient afp_disabled_uams -array-add “DHCAST128″Time Machine needs some tweaking: On the terminal just type $ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 After done so you have to login again or reboot your machine.
Limit the size of backupIn my scenario I want to use an external harddrive connected to my linux server. Because the disk shall be used for other data too it is a good idea to limit the size of Time Machine's backup. This is done by creating a sparse bundle image with OSX's disk utility and copy it over to the external harddrive. Sparse bundle is an image which expands as it is filled with data. For that we need to know the name of the client and the MAC address: Open a terminal and type >> hostname -s to get the short hostname and even if your client is connected via Wifi, like mine, you need the MAC address from the ethernet interface: >> ifconfig en0 | grep ether Concatenate these two informations with an underscore, such as "name_XXXXXXXXXXXX" and you'll get the sparse bundle's filename. Now we have all informations to create the sparse bundle which will keep the backup later on: >> hdiutil create -size 250g -fs HFS+J -type SPARSEBUNDLE -volname "Backup of foo" fooname_XXXXXXXXXXXX.sparsebundle where "size" means maximal size of image (mine is 250 gigabyte), "fs" stands for filesystem, "volname" is just a name. For more informations read the manual: >>man hdiutil Next task is to copy the newly created sparse bundle to your backup disk. Start system settings of Time Machine, point it to your afp share on the server and your initial backup should be on the way. The existing sparse bundle with its long name is going to be renamed to "hostname.sparsebundle".
---- References:
Time Machine Backups unter Ubuntu Limit Time Machine's Backup Size "Time Machine" icon from Author: joshladella005, HomePage: http://joshladella005.deviantart.com
Talking with my webserver the more secure way
This article is a summary of commands to configure the Apache Webserver to extend SSL coded content. Mainly intended as a private mnemonic it's maybe useful for others, too. Create a RSA private key (Triple-DES encrypted and PEM formatted):
Generating a self-signed CertificateCreate a Certificate (X509 structure) with the RSA key you've just made:
Informations you are going to be asked for:
Apache's virtual host configurationGlobal settings
For each virtual host<VirtualHost *:443> ServerName the_server's_name DocumentRoot "/var/www/foo/htdocs" <Directory /var/www/foo> # Enable/Disable SSL for this virtual host. ## SSL Cipher Suite: #Gentoo Wiki http://en.gentoo-wiki.com/wiki/Apache2/SSL_Certificates#Configuring_Apache
LinksGPG Tools
GPGTools claims to be an easy to handle solution for OpenPGP on Mac OS X. It gathers relevant tools to integrate privat key encryption into your workflow. GPGTools is a project that bundles OpenPGP apps for OS X. The installer combines the tools GPG key-chain access to manage your keys, GPGMail for handling of PGP mails in Apple Mail, MacGPG2 to install and access the underlying cryptographic apps, GPGServices for working with plain text files and the copy-paste buffer.All of these are originally supported by the GPGTools team. Enigmail the addon for Mozilla Thunderbirdis also included in the GPGTools installer. GPG for Apple Mail on Snow Leopard
Add-on found to use GnuPG with Apple Mail under Snow Leopard! A few months ago I decided to use MacOS Snow Leopard on my new Macbook Pro not Linux. Unfortunately Apple Mail didn't work together with GNU Privacy Guard. As a temporary work around I'd used a self-compiled commandline version of gnupg as mentioned on the privacy guard website. Encrypted mails I could decrypt to read them in a text editor. Today I'd investigated this topic again and found this thread mentioning an inofficial add-on that works right out-of-the-box! Just download http://dl.dropbox.com/u/112247/GPGMail.mailbundle.zip, quit apple mail and copy the downloaded file to /User/Library/Mail/Bundles/. Happy encrypting!
Continue reading "GPG for Apple Mail on Snow Leopard" The duty to backup - Yet another BackupPC tutorial
Not long ago my backup situation looked like this: Important data had been mirrored across my local net, actual project`s data had been manually rolled out on DVD. Mirroring worked fine with Unison. Outcome was a historically grown chaos. When thinking about the design of the backup process and singling out eligible software it became obvious that i didn`t want a homebrew scripting solution. I wanted a clear system to backup a network with different operating systems (MacOS X, Windows, Linux). My search led me to BackupPC.
These notes don`t want to be more than a mnemonic rhyme. Maybe you'll find some helpful details don't forget to read the manual. The links at the bottom of this page may lead you through that topic. Pathnames in this article are related to Gentoo Linux, you should find them on other linux flavours, too. BackupPC basically a webserver is not needed, the webfrontend is the recommended way to administer the server. (screenshots). For that you need a running webserver. (e.g. Apache) ApacheBackupPC is written in perl. The recommended configuration uses the module mod_perl. Activate it /etc/conf.d/apache2:
http://localhost/perl-status shows you if and how mod_perl had been installed. In my scenario apache also serves multiple local domains and is set up for name-based virtual hosts (vhosts). The backup server is accessible via localhost as default vhost. create /etc/apache2/vhosts.d/backuppc.include with
/etc/apache2/vhosts.d/00_default_vhost.conf: After the entry
the new file has to be included:
Set up users for the web frontend:
For use with BackupPC Apache needs to run with backuppc's rights.
/etc/BackupPC/hosts:
Apache runs as backuppc so trouble may be caused with existing local websites because of missing permissions. For that you can add backuppc to the apache group
and adjust group permissions of affected paths. Another maybe cleaner approach is to set up another web server (e.g. lighttp), start two instances of apache, second one in a virtual machine or host a server on a separate pc. BackupPCFor the backup process to run as root with full file permissions, extent backuppc's permissions by
How to backup Every pc gets his own configuration file: Adjusting the backup command for localhost:
Enabling the root access via Mounting of paths that usually are unmounted. If databases should be backed up, here's the place for any commands to dump your database data to a directory backed up by BackupPC.
What to backup
defines which paths to backup with exemptions,
times of the day when no backup should run. SSH tunnelThe choosen rsync method works flawlessly over a ssl tunnel. i.d. BackupPC does roughly the same as a normal user who logs into a remote client using ssh user@hostname. For the automatic way it's indispensable that user backuppc is able to log in without typing any password. Procedure: For each user in the backup network you'll have to create a key-pair without entering any password:
The public key id_rsa.pub from user backuppc needs to be copied into ~/.ssh/authorized_keys from userA.
In this example of ~/.ssh/authorized_keys an IP filter is set for more security.
on the server userA's public key has to be added
To make the hosts known it's easier to connect via command line - see the testcommand below. To validate the computer's fingerprint to which we want to connect:
at the prompt:
Example known_hosts
The home directory of backuppc must exist.
you open the tunnel. Is that working BackupPC is told to do it the same way.
WOL (wake on lan)PCs which go into sleep mode after a while are woken up by
where /etc/BackupPC/pc/wakeup.sh looks like:
Mac OSX boxes: system preferences - energy saver - "Wake for Ethernet network administrator access" activate this. Mac Laptops with Snow Leopard (>2009) can be woken up, if the power supply is connected and the lid stays open. Links:Rescueing a Gentoo Linux Installation
Basically the german article about this topic is a translation of Neddyseagoons' Rough Guide to Restoring Removed Key System Packages. The things I`ve added are only marginal additions. Ebuilds for jmeters, rotter and silentjack
Sound applications i could not found in the Gentoo ProAudio overlay.
Download Konqueror beschleunigen
Wem der KDE interne Browser Konqueror langsamer vorkommt als Firefox mit aktiviertem HTTP Pipelining, liegt richtig.
Mit Hilfe des kleinen, einfach aufzusetzenden Proxyservers namens Polipo habe ich Konqueror merklich beschleunigen können. Auf der Homepage finden sich vorkompilierte Installationspakete für wichtige Linux Distributionen. Die Konfiguration erledigt sich im Dreischritt:
Die Nameserveradressen werden üblicherweise beim Anmeldevorgang automatisch gesetzt und sollten sich in der Datei Wenn alles rund läuft , fügt man polipo dem gewünschten Runlevel hinzu. Debian: Open Source Digital Audio Workstation Ardour bekommt Unterstützung von der SAE
Als SAE Absolvent freut es mich besonders, dass die SAE die Open Source Audio Workstation Ardour unterstützen will. Als Hauptziele dieser Zusammenarbeit steht der Ausbau der Integration in Mac OS X und die Entwicklung einer light Version für Studenten auf der Agenda. Diese Studentenversion soll voll kompatibel mit dem normalen Programm bleiben und ebenso frei verfügbar sein. Linux auf einem Apple MAC Pro
Nach ersten Erkundungen des vorinstallierten Mac OS X, habe ich mich dazu entschieden, Linux auf dem Mac Pro zu installieren. Obwohl Fink es mir gestattet, Linux Programme unter MAC OS X recht einfach zu installieren und hernach unter X zu benutzen, stolpere ich doch hin und wieder über Eigenarten von MAC OS. Dieser Beitrag resultiert aus den Notizen während der Installation und ist noch nicht fertig...InstallationTrotz der Ähnlichkeit mit PC Hardware zeigt der Apple schon einige Unterschiede zum handelsüblichen Consumer PC. Neben den augenfälligsten Merkmalen des intelligenten und formschönen Designs, besticht die Bestückung mit zwei Intel Xeon 5130 Dual Core Prozessoren. Die detaillierten Spezifikationen zeigen, was drinsteckt. Gewöhnungsbedürfig und seltsam unzugänglich in seinen Einstellungen begegnet mir EFI (Extensible Firmware Interface) als Gegenstück zum gewohnten BIOS. Keine Optionen bieten sich an, um z.B. das Bootmedium zu wählen. Die DistributionNeben Debian probierte ich Gentoo und Kubuntu Feisty Fawn, doch keine der erwähnten Distributionen mochte das CD Laufwerk (Pioneer DVR-111D) erkennen und konnte aus diesem Grund natürlich auch nicht von dortaus hochfahren. Dieses Problem wird detailliert im folgenden Forumsthread diskutiert. In diesem Thread wird die mir bislang unbekannte Distribution Sabayon erwähnt. Sabayon fußt auf der sehr flexiblen Distribution Gentoo, die ich seit einigen Jahren auf einem Centrino Laptop einsetze. Sabayon hat die richtigen Treiber für das Pioneerlaufwerk an Bord und bootet gleich in den Installationsassistenten hinein. Angemerkt sei hier, dass Sabayon wie Gentoo auch alle Pakete von Grund auf kompiliert. Da die Multiprozessorunterstützung von Linux und seinen Programmen Legende ist, verkürzen die 4 Prozessorkerne die Wartezeit erheblich. Die PartitionierungMein Plan war zunächst, die HFS+ Partition von OSX mit Hilfe des BootCamp Assistenten zu verkleinern, um Platz für Linux zu schaffen. Die vom Werk gelieferte Partitionierung umfasst eine kleine (~200MB) EFI Partition, die man tunlichst nicht anrühren sollte. Dazu die HFS+ Partition für Mac OSX. Linux benötigt mindestens eine root (/) Partition und eine swap Partition. Anderen Zweigen des Dateisystembaums (z.B. /home oder /boot) ebenfalls eigene Partitionen zuzuweisen, funktioniert leider nicht ohne die OS X Installation zu beschädigen. Den Grund hierzu liefert die Grafikinitialisierung, die im BIOS kompatiblen Modus ausgeführt werden muss. Damit einher geht die Installation von Boot Camp und die MBR Partitionierung. D.h. die systemeigene GPT Partitionierung muss im BIOS kompatiblen Modus laufen, der zur Zeit nur primäre MBR Partitionen zulässt. Da nicht mehr als 4 primäre Partitionen möglich sind, spricht man hier von der Vier Partitionen Grenze. Umgehen lässt sich diese Einschränkung durch den Einbau einer zweiten Festplatte. Sie kann man in üblicher MBR Manier mit erweiterten Partitionen versehen und braucht sich nicht um GPT Kompatibilität zu kümmern. Diesen Weg empfehle ich auch, denn leisere Laufwerke, als das von Apple verbaute, gibt es im einschlägigen Handel zu vernünftigen Preisen. Der Einbau ist einfach: Klappe auf, in Wagen schrauben, reinstecken, Klappe zu, fertig. rEFIt Bootmenu Screenshot Neben Bootcamp hilft rEFIt. So bekomme ich ein reguläres, in Grenzen konfigurierbares Bootmenü ohne die Taste [ALT] während des Bootvorgangs gedrückt halten zu müssen. Im Idealfall bekommt man auch die passenden Symbole zum installierten Betriebssystem angezeigt. Partitionstabelle 2. Platte
Die Tabelle zeigt die Aufteilung einer 200GB Festplatte für Linux. Die Partition localshare ist für den Austausch mit MacOS gedacht. Dateisystem ist vfat, damit der Zugriff auch mit einem später evtl. installierten Windows klappt. Aktualisierung und VerwaltungKernel backenIm Voraus sei angemerkt, dass der installierte Kernel funktionierte. Intention ist das Anpassen, Verschlanken, Optimieren. Das Howto (5) beschreibt zwei Methoden sich einen angepassten Kernel zu bauen. Zunächst habe ich mich der genkernel - Methode bedient, die einen universell einzusetzenden Kernel wie auf der Live CD der Distribution baut. Das klappte auch sehr schön (inkl. Bootsplash), nur verlängert die automatische Hardwareerkennung des so erstellten Kernels den Bootprozess. Die manuelle händische Methode war zwar von anfänglichen Misserfolgen begleitet, doch bootet der Rechner jetzt schneller. Auf die Konfiguration des bootsplash habe ich dabei verzichtet.Aufbauend auf der Konfigurationsdatei ( 2.6.20 ) des Gentoo Wikis, habe ich die Konfiguration für den aktuellen 2.6.22er angepasst. Ausserdem ist die Unterstützung für DVB-S (i2c, dvb), Bluetooth eingebaut. Die Soundtreiber werden, für mich neu, als Kernelmodule direkt mitgebaut. Die externe Installation der Soundtreiber entfällt somit. So bin ich von Kernelupgrades abhängig und kann nicht mehr unabhängig nur die Soundtreiber erneuern. Bisher hatte ich damit jedoch keine Probleme. Der interne Sound arbeitet zuverlässig. Für ein schlankes System sollte man nicht benutzte Treiber entfernen. Nicht entfernen sollte man die Unterstützung für den Framebuffer. Obwohl eine NVIDIA Grafikkarte verbaut ist, sollte man vom nvidia FB Treiber die Hände lassen und stattdessen auf den VESA Treiber setzen. Der fbnvidia verhindert später den Start des X-Servers, der Grafischen Benutzeroberfläche.Der Kernelaufruf in der grub.conf beschränkt sich bei mir auf das wesentlichste: Die Firewire Schnittstellen (Modulunterstützung) funktionieren in beiden Geschwindigkeiten (400/800). Denkt man an die zu ladende Firmware, klappt's auch mit der US-122 (Modul SND_USB_USX2Y). NetzwerkintegrationUnerwartete Aufgaben mit Lösungen
Hilfreiche externe Links (zumeist auf Englisch)
(Page 1 of 3, totaling 24 entries)
» next page
|
QuicksearchLanguageTopicsMy Flickr AccountMy international micro notes;-)
Older blog posts
Blog Administration |





