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
Webcommunities
Why not Facebook? I do not have the heart to become a member of Facebook. And I really do not know why so many go to Facebook. Ok, I am told and understood that Facebook gathers many services under one roof. So email and chat is no longer required to stay in contact. Your homepage let alone your personal blog (like this one) can be deleted right away. Or - what a pleasure - write everything twice;-) That's why I'm not a member of facebook yet. As @nicbeu you will find me at twitter. One more opportunity to link to my blog. It's even exiting to twitter from my mobile. Yep, i do have a mobile data flatrate now! Likely the last one on this planet. Hopefully some relevant facts come to my mind to share with you. More Noise Than Melody (5:43)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. Die historisch geopolitische Relevanz von Telefonvorwahlverzeichnisheftchen
Heute habe ich in einer seit mehr als vierzig Jahren unverändert eingerichteten Berliner Wohnung ein Verzeichnis mit Vorwahlnummern in die Hand genommen. Eigentlich wollte ich nur... ...kurz eine Vorwahl nachschlagen, als mich danach auf dem hinteren Schutzumschlag unter der Überschrift Lebensmittel und Trinkwasser der Hinweis festhielt, dass ich mir für den Fall einer Störung der Lebensmittel- und Trinkwasserversorgung einen Notvorrat für 14 Tage anlegen sollte. In einer Tabelle darunter waren in der ersten Spalte Beispiele für Vollkonserven, Milch und Fette, Trockenvorräte und Sonstiges aufgelistet, in folgender Spalte die empfohlene Menge auf Grundlage eines 2000 Kilokalorienbedarfs und zuletzt die Lagerdauer entsprechend den Empfehlungen des Bundesministers für Ernährung, Landwirtschaft und Forsten. Weiter stand dort, dass ich für 14 Tage 2 Liter Flüssigkeit pro Tag und Person bevorraten sollte, was für meinen 3 Personen Haushalt insgesamt 84 Liter gewesen wären. Telefonbuch der Vorwahlen (1992) Während ich so in Gedanken Getränkekästen stapelte und bald auch Thunfisch- und Fleischkonserven neben Kondensmilch, Zucker, Salz und Kaffeepaketen aufbaute, kostete ich mein Unbehagen aus, bis ich mich erinnerte, dass ich eben solch vollgepackte Keller in meiner Kindheit gesehen hatte. Ich ahnte bereits, welchem Spuk ich aufgesessen war und beeilte mich die noch folgenden Überschriften wie Tipps – noch mit einem p geschrieben – für die Vorratshaltung, Beleuchtung, Notgepäck, Dokumentensicherung und Selbstschutzausbildung zu überfliegen. Über all dem stand der Bundesverband für den Selbstschutz als Informationsquelle mit wichtigen Hinweisen zur Vorsorge und Eigenhilfe des Bürgers. Zudem wurde ich aufgefordert zur vorherigen Seite zurückzublättern, um den Anfang nicht zu verpassen. Telefonbuch der Vorwahlen vom 1.1.1996 Sofort fiel es mir wieder ein, wie ich das alles schon einmal gesehen und zu bedeutsam befunden hatte, um es zu entsorgen, was da zuletzt 1992 über die Beilage zum Telefonbuch mit nationalen und internationalen Vorwahlnummer an deutsche Haushalte verteilt worden war. Unter der Überschrift Sirenensignale waren jene Signale beschrieben für "den hoffentlich nie eintretenden Verteidigungsfall der aber trotz aller Friedensbemühungen leider nicht ganz ausgeschlossen werden" konnte, für Feueralarm, Luftalarm, ABC-Alarm und Entwarnung. Ja, ich war schockiert gewesen und hatte damals die nächste Auflage des Verzeichnisses der Vorwahlen, herausgegeben von der Deutschen Telekom am 1. Januar 1996, auch behalten und dazu gelegt. Auf der Rückseite stehen hier die Durchwahlnummern des Deutschen Wetterdienstes vor pinkem Himmel mit rosa Wölkchen. Fazit: Rosarote Entwarnung seit 1996. cpGPG 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:Testing ground
For the time being this site is used as a platform for testing serendipities ability to act as a multi-language blogging software. Due to this problems in layout and accessibility may occur. Please apologize any inconveniences. Continue reading "Testing ground"
(Page 1 of 7, totaling 70 entries)
» next page
|
QuicksearchLanguageTopicsMy Flickr AccountMy international micro notes;-)
Older blog posts
Blog Administration |





