I've been reading about using the terminal command line input for updating folders/directories containing back up copies of photos stored on external hard drives.
I have back up copies of folder/directories on several external drives.
Copying a new folder/directory isn't a problem using cp -pvR, where -p preserves pretty much everything, -v verboses the output in the terminal window, and -R allows the directory to recursively be copied to the appropriate directory on the external HDD. Sometimes using Finder dragging and dropping the folder to be copied to the appropriate folder on the external HDD runs into snags so I've gotten into the habit of using Terminal.
So I've done a lot of reading in man pages and via googling. The rsync with appropriate flags looks like the answer, but each time I've used it to update the contents of a folder/directory on an external HDD, it's changed the modification dates/times of file/photos that haven't really been altered. Not all photos. Just those with a tif extension, and not even all of those. The date changes to the date of the synchronizing. Running rsync today changed the modification date to "today," as seen in a Finder window.
The command I've tried is
rsync -aEvP
Where -a preserves pretty much everything, -E preserves extended attributes (Apple specific for Darwin), -v verboses the output to the terminal window, and -P shows the progress under the verbose stuff's line.
I've tried rsync -aEvPt, but the -t didn't help.
Thinking that there might be a problem with the change from daylight time to standard time, I tried:
rsync -aEvP --modify-window=3601
Where the --modify-window=3601 causes rsync not to update the file unless the file has changed by longer than an hour.
That also didn't change the rsync behavior.
.
After using the rsync and seeing the changed modification dates, following a suggestion found at apple support forum, I ran:
ls -Tl for the folder/directory on my internal HDD in one Terminal window and the same command for the folder/directory on the external HDD in another Terminal window.
The output of ls -Tl shows what it should for the folder of photos on the internal HDD and it shows the modification dates for the folder of photos on the external HDD to be today's date and the time is the time of the synchronization. This mirrors what the Finder windows show.
So using the command rsync -aEvP is creating a change in some of the tif files that it analyzes and decides to rewrite at the target directory. It hasn't changed any of the previously copied jpg, dng, or raf files.
I've also tried putting a / (slash) at the end of the source folder/directory to just synchronize the contents and not create a new folder/directory at the target, but that hasn't made a difference either.
So I've been having to copy the whole folder/directory again using cp -pvR or using the command ditto. The ditto command like the cp command (with all its flags) copies the whole folder/directory's contents preserving all the appropriate attributes and modification dates/times. The command ditto seems slower than the cp command.
I'm hoping that someone in the MacRumors forum community might have some insight into the rsync behavior I'm seeing, and possibly have some suggestions that might cause it to accurately transfer files.
I'm using a late 2011 mbp running OS 10.7.5 and the Terminal is at its default settings, saying bash at the top of the window. Terminal is version 2.2.3.
The external HDDs are all HFS+ formatted. The connection is FW800 to the first HDD and FW400 to the other external HDDs, daisy chained. The behaviour of rsync occurs when attempting to synchronize between the mbp and the first HDD or between the first HDD and the second HDD.
I have back up copies of folder/directories on several external drives.
Copying a new folder/directory isn't a problem using cp -pvR, where -p preserves pretty much everything, -v verboses the output in the terminal window, and -R allows the directory to recursively be copied to the appropriate directory on the external HDD. Sometimes using Finder dragging and dropping the folder to be copied to the appropriate folder on the external HDD runs into snags so I've gotten into the habit of using Terminal.
So I've done a lot of reading in man pages and via googling. The rsync with appropriate flags looks like the answer, but each time I've used it to update the contents of a folder/directory on an external HDD, it's changed the modification dates/times of file/photos that haven't really been altered. Not all photos. Just those with a tif extension, and not even all of those. The date changes to the date of the synchronizing. Running rsync today changed the modification date to "today," as seen in a Finder window.
The command I've tried is
rsync -aEvP
Where -a preserves pretty much everything, -E preserves extended attributes (Apple specific for Darwin), -v verboses the output to the terminal window, and -P shows the progress under the verbose stuff's line.
I've tried rsync -aEvPt, but the -t didn't help.
Thinking that there might be a problem with the change from daylight time to standard time, I tried:
rsync -aEvP --modify-window=3601
Where the --modify-window=3601 causes rsync not to update the file unless the file has changed by longer than an hour.
That also didn't change the rsync behavior.
.
After using the rsync and seeing the changed modification dates, following a suggestion found at apple support forum, I ran:
ls -Tl for the folder/directory on my internal HDD in one Terminal window and the same command for the folder/directory on the external HDD in another Terminal window.
The output of ls -Tl shows what it should for the folder of photos on the internal HDD and it shows the modification dates for the folder of photos on the external HDD to be today's date and the time is the time of the synchronization. This mirrors what the Finder windows show.
So using the command rsync -aEvP is creating a change in some of the tif files that it analyzes and decides to rewrite at the target directory. It hasn't changed any of the previously copied jpg, dng, or raf files.
I've also tried putting a / (slash) at the end of the source folder/directory to just synchronize the contents and not create a new folder/directory at the target, but that hasn't made a difference either.
So I've been having to copy the whole folder/directory again using cp -pvR or using the command ditto. The ditto command like the cp command (with all its flags) copies the whole folder/directory's contents preserving all the appropriate attributes and modification dates/times. The command ditto seems slower than the cp command.
I'm hoping that someone in the MacRumors forum community might have some insight into the rsync behavior I'm seeing, and possibly have some suggestions that might cause it to accurately transfer files.
I'm using a late 2011 mbp running OS 10.7.5 and the Terminal is at its default settings, saying bash at the top of the window. Terminal is version 2.2.3.
The external HDDs are all HFS+ formatted. The connection is FW800 to the first HDD and FW400 to the other external HDDs, daisy chained. The behaviour of rsync occurs when attempting to synchronize between the mbp and the first HDD or between the first HDD and the second HDD.