Hi all! I'm trying to use rsync (from the command line) to keep the music on my n900 up to date with my main pc. When I first run it it taransfers everything (eventually) and if I run it again right after that it doesn't transfer anything or do anything just like I'd expect. If I run it again in a few minutes though, seemingly random files are retransferred though they have not changed on either computer. Also it seems that the Maemo adds a hidden .mediaartlocal directory in each of my album directories, but this is not a problem and I don't mind that rsync deletes them. The problem of retransferring files unecessarily is an issue though because, if I add an album to my collection on my main computer, I want to be able to tranfer it to my n900 with a single command and not have to wait for the rest of my library to transfer for no reason.
So to test this issue I created a very small subset of my music and used rsync to copy it to the n900. Right after this I did an "ls -lisaR" and saved the listing. I also copied the directory on the n900. Then I waited a few minuts and ran rsync again and sure enough my test directory retransferred. I then saved the output of the recursive ls and compared it with the listing from before the retransfer. They are the same except for the .mediaartlocal directories. I also do a recursive diff on the directories and they are identical (again except for .mediaartlocal). So the question is why is rsync retransferring the files when they are identical to the source files in every observable way? Am I missing some aspect of a file where they might differ? I guess this is more of an rsync issue than a Maemo one but I figured I'd post it here since the problem could be something to with with being on an embedded system.
Ok I'm pretty sure I solved this if anyone happens to have the same problem and stumbles upon this thread. It seems that what was happening was that Maemo was touching the directories but not the individual files, which makes sense since it was adding the .mediaartlocal directory. Apparently though rsync retransfers all the files in the directory if the directory itself was touched? This doesn't make much sense to me as far as the way rsync shoud work but that's another issue.
The solution was to use the -c flag to use a checksum instead of file sizes and modification times. While considerably faster, this still takes more time than I'd like as the n900 struggles to compute the checksums for all 19 GB of music files.
So to test this issue I created a very small subset of my music and used rsync to copy it to the n900. Right after this I did an "ls -lisaR" and saved the listing. I also copied the directory on the n900. Then I waited a few minuts and ran rsync again and sure enough my test directory retransferred. I then saved the output of the recursive ls and compared it with the listing from before the retransfer. They are the same except for the .mediaartlocal directories. I also do a recursive diff on the directories and they are identical (again except for .mediaartlocal). So the question is why is rsync retransferring the files when they are identical to the source files in every observable way? Am I missing some aspect of a file where they might differ? I guess this is more of an rsync issue than a Maemo one but I figured I'd post it here since the problem could be something to with with being on an embedded system.