Rsync and mp3tofid Guide Please!!!

Posted by: MP3944

Rsync and mp3tofid Guide Please!!! - 17/10/2002 23:54

Hello,
After reading some posts on these topics, I have come to the conclusion that I am an idiot when it comes to Linux. Is there a guide that I may have missed on here to use Rsync and mp3tofid on my XP box? These two apps sound promising, because, instead of downloading emplode or jEmplode at a remote location to upload MP3s, I could theoretically place these tools on the EMPEG and download them to the remote computer to use for the time being. It also strikes my interest in that it is essentially like synchronizing a PalmPilot or similar product. So anyways, can someone please walk me through the steps on getting these programs setup?
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 18/10/2002 10:30

Just for the sake of learning the process, I have ran the disk builder upgrade and put the Developer Beta13 image and Hijack v300 on the Empeg. That is currently the only piece of software on it.
Eagerly Awaiting instructions on rsync and mp3tofid.
Justin
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 18/10/2002 16:44

i'll post a step-by-step howto as soon as i get home from work.
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 18/10/2002 21:01

Thank you soo much!!!
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 18/10/2002 21:51

caution... you need to be at least somewhat adept in a linux enviornment. this is basically borrowed from the readme in mp3tofid, so i'm not sure why you really need this.

ok, first you're going to need the following files:
cygwin
mp3tofid v3.00
rsync
elvis text editor

assume that your mp3s are located in e:\mp3, and create a folder called e:\empegfids to hold all your files generated by mp3tofid.

Windows Setup:
1) install cygwin, rsync for cygwin, and vim for cygwin.
2) copy and untar mp3tofid to you home directory in cygwin
3) create an rsync.conf file and put it in the /etc directory:
[empegfids]
path = /cygdrive/e/empegfids
read only = yes
use chroot = no

4) run instsrv.sh contained in the mp3tofid directory to create a permanent service for rsync's daemon.
5) run the command mp3tofid -Ii /cygdrive/e/mp3 /cygdrive/e/empegfids to generate all relevant files.
*whenever you update your mp3 collection, repeat step 5

Empeg Setup:
1) using an ftp program, copy rsync and elvis to the empeg.
2) untar rsync.
3) create a file rsync.sh using elvis containing the following:
#!/bin/bash
rsyncserver=windows_box_ip
modulename=empegfids
set -x
swapon -a
rwm
rsync \
$@ \
--times \
--delete \
--verbose \
--recursive \
--copy-unsafe-links \
--exclude=config.ini \
--exclude=lost+found \
${rsyncserver}::${modulename}/drive? /
rom
swapoff -a

4) run rsync.sh and be done with it.
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 18/10/2002 22:01

by the way. re-reading your first post made me realize that i missed the fact that you want to be able to do this both ways (i.e. palm pilot). this is a one way operation. if you want to retrieve mp3s from your empeg, then you'd have to download them then put it in your mp3 tree.
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 01:18

Can you please explain some more on the empeg side? I think I need more step-by-step instructions, sorry for not being linux savvy, but I think it will help other windows users as well. Also, do I need to run the rsync.sh script more than once (once, I get it working of course)?
Thanks in advance,
Justin
Posted by: Neutrino

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 08:20

Heres a Doc File for Elvis.
Posted by: Neutrino

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 08:29

And here another that is much better.
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 10:04

Can someone write me this script file and tell me how to implement it on the empeg?
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 12:36

When running the script via hyperterminal, it says :No such file or directory.
I created the script Using UltraEdit32 and saved it directly to the rsync folder via ftp in ASCII format. I have tried running the file in the main folder of the empeg (the one that every other folder is contained within) and I have made sure that I chmod 755 to the rsync.sh. I don't know if it has anything to do with the line towards the bottom where it says /drvie?. I need serious help.
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 13:04

Good news, I converted the file to UNIX format in UltraEdit32 but, the following is displayed when running the script:
+ swapon -a
+ rwm
+ rsync ' '
./rsync.sh: rsync: command not found
+ ' '
./rsync.sh: : command not found
+ --times ' '
./rsync.sh: --times: command not found
+ --delete ' '
./rsync.sh: --delete: command not found
+ --verbose ' '
./rsync.sh: --verbose: command not found
+ --recursive ' '
./rsync.sh: --recursive: command not found
+ --copy-unsafe-links ' '
./rsync.sh: --copy-unsafe-links: command not found
+ --exclude=config.ini ' '
./rsync.sh: --exclude=config.ini: command not found
+ --exclude=lost+found ' '
./rsync.sh: --exclude=lost+found: command not found
+ '192.168.0.100::empegfids/drive?' /
./rsync.sh: 192.168.0.100::empegfids/drive?: No such file or directory
+ rom
+ swapoff -a
The script is attached, but I don't know how much it will help.
Posted by: Neutrino

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 13:05

Are you typing the entire path to the script? Did you chmod it after you moved it into its present location?
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 13:29

When I run the script it is in the same directory as rsync and it I did a chmod 755 to it, but it still produces the same errors.
If you use AOL or Instant Messenger, contact me at the s/n gcjustin
Posted by: mtempsch

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 14:49

Calling rsync as just "rsync" in the script requires that the directory it's in is in the $PATH. Current directory, ie ".", isn't by default in $PATH. You probably want to edit it to say ./rsync (or /actual/full/path/to/rsync )

Also, make sure that the \ characters are the very last character on the lines where they are, as they're ment to "escape" the following line break...

/Michael
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 15:26

Is my rsync untarred correctly, I used -xvf when untarring it.
And I copied the script exactly as it is above. I even typed it myself to make sure there were no windows line breaks in it. And yet the script still does not work.
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 15:34

I found this small error:
./rsync: error in loading shared libraries: libresolv.so.2: cannot open shared o
bject file: No such file or directory
Can this be stopping my script from working? But I have the file.
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 23:20

you have to put libresolv.so.2 that came with rsync somwhere like /lib.
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 19/10/2002 23:23

and here's the script that i use. edit accordingly.
Posted by: mtempsch

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 00:04

And I copied the script exactly as it is above. I even typed it myself to make sure there were no windows line breaks in it.

Well, opening both your and iMaGes scripts in UltraEdit, having used the same method of saving both attachments to disk, only on his does UltraEdit ask if it should convert to DOS style line-breaks. Meaning that yours already has them...

Also, your script has an extra space after the \-characters which iMages does not have.

/Michael
Posted by: pim

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 12:23

and here's the script that i use. edit accordingly

There's a typo there, rop should be rom
Also, I would not recommend to reboot immediately after sync'ing, as this will wipe away all error messages from your screen, should there be any.

Pim
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 14:00

I am making some headway, but it seems like it doesn't want to advance past:
+ /rsync-2.5.5/rsync --times --delete --verbose --recursive --progress --copy-un
safe-links --exclude=config.ini --exclude=lost+found '192.168.1.100::empegfids/d
rive?' /
But how long should it take? I am only uploading 370MB for a test.
EDIT: rsync: failed to connect to 192.168.0.100: Connection refused
rsync error: error in socket IO (code 10) at clientserver.c(97)
I have rsync installed as a service. But is there a way I can make it run all the time instead of it being automatic. If I try to start the service, it will start and then stop, because windows says it has nothing to do.
Posted by: image

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 14:42

actually, ro also does the music partitions.... rop is the script to make /programs0-1 read only. as for restarting the player, i have the scroll log of any errors that would happen.
Posted by: pim

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 16:56

EDIT: rsync: failed to connect to 192.168.0.100: Connection refused

This means your PC is not listening on rsync's tcp port, ie rsync is not running. You can test whether your PC is listening by typing "rsync 192.168.0.100::" from the empeg command prompt, or by typing "rsync localhost::" in the cygwin bash shell. It would then show the rsync modules you have configured in /etc/rsyncd.conf.

If I try to start the service, it will start and then stop, because windows says it has nothing to do

This means there's something not set up right in your cygwin environment. Check whether rsync is really installed at all, whether cygrunsrv is installed, check /etc/rsyncd.conf (whether it's there, whether it contains the right syntax and whether it does not contain carriage returns). You can add
"log file = /unix/path/to/a/logfile" to /etc/rsyncd.conf to see what is happening. You could also type "rsync --daemon --no-detach" from the command line rather than as a service to see whether it can find the rsyncd.conf file at all.

Pim
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 20/10/2002 17:06

running rsync --daemon --no-detach before running rsync on the empeg worked. How do I uninstall the rsync service on XP so I can reinstall it correctly?

EDIT: I love rsync, sure I have to use jEmplode or Emplode to get my track position right, but I average over 900kB/s!!!
Posted by: pim

Re: Rsync and mp3tofid Guide Please!!! - 21/10/2002 02:05

How do I uninstall the rsync service on XP so I can reinstall it correctly?

cygrunsrv --remove service-name


Pim
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 01/11/2002 11:48

Okay, when I rsync everything, and then go to emplode or jemplode and sync, it trunicates some of my playlists. It iwll take my current total of songs from say 186 to 94. If I do not do this then some of my songs will refuse to play and then freeze the player if I try to shuffle or select a new playlist with those songs "active". I sync it with emplode and/or jemplode so I can get my mp3's in ABC order on the player.
Posted by: pim

Re: Rsync and mp3tofid Guide Please!!! - 03/11/2002 11:51

You might have something weird in your tags that mp3tofid does not check, like length > 255 or embedded newlines. Could you zip up your empegfids dir and mail it to me (pim at zandbergen dot org) so that I can have a look?

I sync it with emplode and/or jemplode so I can get my mp3's in ABC order on the player.

mp3tofid sorts your mp3's on filename. Please explain why that does not suit you.

Pim
Posted by: MP3944

Re: Rsync and mp3tofid Guide Please!!! - 05/11/2002 12:11

Here is the file you requested.
I would like the mp3s sorted by track name, but all my songs are in Artist-Track format.
Posted by: pim

Re: Rsync and mp3tofid Guide Please!!! - 05/11/2002 17:20

Your collection is relatively small, yet it is split across two drives.

Let me guess: you only have one drive ..

Then you should use the "-2 0" switch, which means put 0% on the second drive. mp3tofid cannot tell how many drives you have and how big they are, so you need to tell it.

You are probably also better off with the "-o" switch. This means "use old directory structure" using one big flat fids directory per drive. On large (filled) drives, the new structure is a big performance win, but with small collections there is no difference. And currently, hijack cannot handle the new structure in its playlist handling.

Pim