Categories
Apple Linux Software

Rsync backups

My own simple rsync backup ‘script’.

You’ll need a rsync server, something to backup, and ssh-agent running to ease the process (or, fill in your password each time).

Add the following lines (using a terminal text editor) to a text file (“.rsync” for example, hidden files under Unix-like systems), and chmod +x $file.

1
2
3
rsync --archive -uv --exclude-from=/home/you/.rsync_exclude \
--rsh="ssh -p 222" --delete --stats --progress /Users/you/Documents/ \
you@remost.host.com:/home/you/remote-backup-directory

This will upload any files in /Users/you/Documents to /home/you/remote-backup-directory.

It will use ssh on port 222 to transfer the files.

Just execute ./.rsync (if that’s the name of your file) to run it.

If you make any changes (locally), and run this, the changes will be applied on the remote server (e.g. file changes, renames, deletes, …) — this will delete files on the remote server if you’ve deleted them locally!

The file .rsync_exclude is optional, it includes all files or directories that should NOT be uploaded

This is what I have in my .rsync_exclude:

1
2
Nazgul:~ yeri$ cat .rsync_exclude
Parallels/*

Simple as hell, and yet so handy!

Categories
Apple Errors Networking Software

Hamachi(X) on Leopard

When playing with KisMAC, I noticed something weird in my /var/log/system.log;

1
2
3
4
$date com.apple.launchd[1] (tuncfgd$pid) posix_spawnp("/usr/sbin/tuncfg", ...):
No such file or directory
$date com.apple.launchd[1] (tuncfgd$pid) Exited with exit code: 1
$date com.apple.launchd[1] (tuncfgd) Throttling respawn: Will start in 10 seconds

tun is (trying) to restart every 10 (!) seconds.
I tried updating Hamachi‘s tun/tap drivers, without any success. It kept restarting the process every 10 seconds.

After a bit of Googling, it seemed to be a known problem. So I decided to uninstall Hamachi & the tun/tap drivers.

1
2
3
4
5
6
sudo rm -r /usr/bin/hamachi
sudo rm -r  /usr/bin/hamachi-init
sudo rm -r  /usr/sbin/tuncfg
sudo launchctl unload /System/Library/LaunchDaemons/tuncfgd.plist
sudo rm -r /System/Library/LaunchDaemons/tuncfgd.plist
sudo rm -r /Applications/HamachiX

This should solve the restarting problem. You might want to reboot to be sure.

When uninstalling the drivers, HamachiX will be gone; there will be no way to use it. You can decide to ignore the spawning-processes, and keep using Hamachi as-is, but the spawning processes might slow down your computer. But HamachiX should work (although it often crashed here).

I tried reinstalling the tun/tap drivers, but the same happens. I guess I’ll have to wait for a fix. 🙁

On the other side, I’ve tried the console version of Hamachi (so no HamachiX) which seems to be working fine (so far). Just missing out on the handy GUI. Edit

Categories
Apple Software

Mac OS X.5.2

Yes, it’s here, finally!

A 355 Mb patch, downloaded over poor UMTS/3G at school and in the train… Took a while, but it’s finally installed.

Some nice few features, like the fact you can now remove the semi-transparent effect on the menu bar (makes it nicer). They also added some nice stacks enhancements.

A Time Machine icon is added in the menu bar too, just too bad you can’t make it just pop-up when it is actually backing up. I like keeping my menu bar clean. 😉

And well, a lot more bug fixes, but haven’t noticed any of them, besides perhaps iCal that for some reason hides appointments, as if they were deleted. After changing weeks/refreshing the page, if reappears… (most iCal bugs were fixed in patch 15.1 for me)

The only thing they haven’t fixed is the Workgroup problem… Still can’t join one. If forgets the name of the workgroup I’ve entered when I close the window… Yes, there are some workarounds, like copying the network-location and so on, but I haven’t tried yet.

But hey, I’m glad with this. 🙂

No big changes, but I hope Leopard’s bugs are fixed now

Categories
Apple Software

EyeTV + ffmpegX = iMovie

EyeTV is a cool application that let’s you watch TV on your Mac. I happen to have the “lite” version, because it was significantly cheaper than the other version.

The cool thing is, you can easily record films or TV episodes with it, but with this version, there is no way to export it to a iMovie project, or to play the recording in a QuickTime based application.

When recording, it creates a folder “Live Recording – $date $time.eyetv”. And when double clicking it, it will open EyeTV.

Now if you would go into that folder (rather than opening it), for example with Terminal, you would see four files.

1
2
3
4
5
6
7
Nazgul:Desktop yeri$ cd Live\ Recording\ -\ 31-01-2008\ 21_54.eyetv/
Nazgul:Live Recording - 31-01-2008 21_54.eyetv yeri$ ls -ls
total 1515968173
6 -rw-r--r--  1 yeri  yeri     886080 Jan 31 22:08 000000000d526cf1.eyetvi
8 -rw-r--r--  1 yeri  yeri       1137 Jan 31 22:08 000000000d526cf1.eyetvp
8 -rw-r--r--  1 yeri  yeri       1950 Jan 31 23:48 000000000d526cf1.eyetvr
1514216 -rw-r--r--  1 yeri  yeri  775275716 Jan 31 22:08 000000000d526cf1.mpg

The only important file is the .mpg file. You can open it with QuickTime, but you won’t have any sound.

To move your .mpg file to, e.g., your Movies directory, use (change $You with your username):

1
Nazgul:Live Recording - 21_54.eyetv yeri$ mv *.mpg /Users/$You/Movies/

The only player that plays the file correctly is VLC. No way to import it in iMovie, edit it, or share it. But, have no fear, there’s a workaround using ffmpegX. Download and install it (follow the instructions on the website, you’ll need to install 3 extra binaries too).

When installed, open the program, import the .mpg file, and export it to, for example, a .mov (-mpeg4) file.

ffmpegX

Converting might take a while.

All you then have to do, is to import it in iMovie.

iMovie

Follow the steps on the screen. iMovie will ask you a few things, and then you’ll be ready to edit your recording!

With iMovie ’08, you can even directly share your records on YouTube, cool stuff!

iMovie

Categories
Apple Software

IP calc

For those who have to work with IP’s and subnets, I have only one word; Bitcricket IP Calculator.

It converts decimal IP’s into binary or hexadecimal IP’s (and, the other way around too); it gives you the IP class; it calculates subnets, with the number of hosts/subnet, and gives you the number of host bits; and many more!

Shiny tool to quickly do subnet calculations. Has proven it’s use when doing the Cisco CCNA tests. 😉