elfs: (Default)
[personal profile] elfs
I managed to restore a significant portion of my music collection at the office, and had a geek moment while I did so. I mounted my iPod's managerial API as a filesystem under Gentoo Linux and sucked it dry.

The iPod is a 5GL 30GB machine. It's old but so far still reliable. I've dropped it three or four times during it's life span. (I got it in March of 2006.)

FUSE is the Filesystem in Userspace toolkit, a simple library that hooks into the Linux mount system and allows you to mount anything as a filesystem so long as it speaks the FUSE API.

If you've ever owned an iPod, you know that the iPod database presents a number of different paths to the music. /Genre/Artist/All/Album/Song is one path, and /Albums/Songs is another. If those look like filesystem paths, good, because Fusepod thinks so too. I was able to mount my iPod database as a filesystem and then just use rsync or tar to copy everything out of my iPod and onto my desktop.

The sequence after plugging in the iPod is:

 # sudo mount -o ro /mnt/ipod
# sudo fusepod -o allow_other,ro /mnt/ipod-fuse
# cd /mnt/ipod-fuse/Albums
# tar cvf - . | ssh desktop 'cd Music; tar xf - '
# sudo fusermount -u /mnt/ipod-fuse
# sudo umount /mnt/ipod
# sudo eject /mnt/ipod
Since this was just pulling stuff off the ipod, I mounted it read-only. I didn't want there to be a chance of fusepod mucking with the database, since I also use GtkPod as my preferred tool of syncing the thing and I've sometimes had problems in the past with fusepod and gtkpod disagreeing on the hash keys used to compile the iPod's music database.

If you're a Gentoo user, FUSE is part of the normal package of available installs under portage, but Fusepod is not. For that, you'll have to use the Sunrise overlay, and mark it permitted, because it's currently masked testing for x86 (as is everything in Sunrise).

Date: 2009-01-16 06:48 pm (UTC)
From: [identity profile] ionotter.livejournal.com
Make me a sandwich.

What??? *snort* As if!

Sudo make me a sandwich.

Okay.

Date: 2009-01-17 06:07 am (UTC)
ext_3294: Tux (Default)
From: [identity profile] technoshaman.livejournal.com
Ummmm, Elf? Rsync much? (It doesn't have to be machine to machine....)

Date: 2009-01-17 07:00 am (UTC)
From: [identity profile] elfs.livejournal.com
All the time. Rsync doesn't work with fusepod because fusepod has a broken modtime implementation.

Date: 2009-01-17 08:54 am (UTC)
ext_3294: Tux (Default)
From: [identity profile] technoshaman.livejournal.com
Hmmm. If you're just trying to get'em all and don't care about doing what rsync normally does,

rsync -av -I /path/to/ipod/ /shared/drive/ipod/.

( -I as in Ignore timestamps, just copy the whole kit and kaboodle....)

Should be quite a bit faster than spawning two tar's...

(I *knew* there hadda be some way to tell rsync to do that; it's too good a tool not to have such a thing!)

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 22nd, 2026 08:14 pm
Powered by Dreamwidth Studios