Can someone help with 'rsync'?
My script now does everything I need it to I think.
FLAC files are transcoded with
Code:
--------------------
oggenc -q 5 "$infile" -o "$tmpfile"
mv "$tmpfile" "$outfile"
--------------------
CUE files are edited with
Code:
--------------------
sed -i 's/.FLAC"/.ogg"/gi' "$outfile"
--------------------
All other files (jpg, mp3, ogg etc) are simply copied over.
Every file then gets its 'last modified' time set to the same as the
source file with
Code:
--------------------
touch -r "$infile" "$outfile"
--------------------
This all seems to work well and I now have a compressed version of my
library that takes up about 48GB rather than 160GB in uncompressed
form.
So now I'm trying to copy it all over to a 117GB partition on the same
128GB microSD card that pCP runs from.
Using the following rsync command, everything seems to copy over, and
the 'last modified' timetag seems to come across correctly from the
source file.
Code:
--------------------
rsync -rtvhiO --delete /mnt/MusicBackup/MusicOgg/ /mnt/MusicInt/Music/
--------------------
My problem is that if I run the same rsync command a second time
immediately after the first one completes, every file seems to get
updated, with the reported reason being because the timestamps differ.
Sometimes if I stop the rsync job and issue it again, it picks up where
it left off, implying that the files it updated previously didn't need
updating again. But if I run the rsync command again once it completes
it seems like all files get updated again, with the reason given as
'>f..t......', which I believe means the modification time doesn't
match.
As far as I can see, the '-rtvhiO options do the following:
-r = recurse into subfolders
-t = preserve modification times
-v = verbose output
-h = human-readable output
-i = itemise changes
-O = omit directories from -t option
For this 'working copy' of my compressed library I don't care about the
modification timestamp, but I understand that I should make rsync
preserve the timestamp so that its quick algorithm for deciding whether
a file needs to be updated in the future can work.
The -t option seems to be working - according to 'stat' the 'last
modified time' on the copied file matches that on the input file. So
I'm a bit stumped - why does a second rsync, immediately after the
first, want to change all the files again?
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110496
_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/ripping