June 11, 20251 yr I am attempting to keep most of my data in-sync between my primary Unraid server and a backup server I have just stood up. All is pretty much well, but rsync complains about a lot directory timestamps being different. I think this is due to the way Unraid and shfs handle split directories. It seems like the mtime returned for a directory is always the most recent, which is making rsync claim it is updating timestamps on any folder which is split on the destination side. Needless to say, with almost 500,000 folders in the backup set, my logs are tedious. I thought at first that maybe syncing the mtimes between /mnt/user/disk1/foo/bar/baz/ and /mnt/disk2/foo/bar/baz/ before the backups would fix it, but that did not seem to help. Has anybody else slain this dragon? I am just about to add a line to my backup script that re-writes the log with all those directories' lines excluded. Its kind of messy and inelegant, but if I have the first log sent to "backup.log.temp" and then grep -ve "/$" >> backup.log that should give me the cleaner logs I want.
June 12, 20251 yr Community Expert Give us the switches you are using for rsync. I mount the 'source' server using Unassigned Devices as a Samba share and I have never seen this error. Here are my switches:rsync -avhPX
June 12, 20251 yr Author rsync -a --delete --numeric-ids --relative --delete-excluded --itemize-changes --omit-dir-times --exclude-from=/config/backup.list --link-dest=/backup/alpha.1/whelpThe --omit-dir-times was my latest attempt at this. I turned on the funky --itemize-changes view to see why it was listing so many directories in the log. It comes out "cd..t......" in which the t indicates a timestamp issue.
June 12, 20251 yr Community Expert 12 hours ago, Duane said:All is pretty much well, but rsync complains about a lot directory timestamps being different. I think this is due to the way Unraid and shfs handle split directories. It seems like the mtime returned for a directory is always the most recent, which is making rsync claim it is updating timestamps on any folder which is split on the destination side.What do you mean by the word "complains"? Is it merely listing that it changed the timestamp or is it an actual error statement.Are you using rsync in a script? If so, how are you handling the command's std out.I use rsync in a Command Line command and std out goes directly to the Terminal screen. My directory times are updated but I have never seen any notification of that event. But I only have about fifteen directories. This is what a portion of my typical output looks like:HAve you tried the -q switch to silence the output? Edited June 12, 20251 yr by Frank1940
June 12, 20251 yr Author The lines in your output that just show a directory name are what I am trying to eliminate. I just added a line in my daily backup script that greps out all the copied files and puts them in a new "copied-files.log" that I will have handy to figure out when a file last got copied. I'm just going to leave it at that. I need to stop obsessing over these backups and just let them run.
June 12, 20251 yr Community Expert 8 minutes ago, Duane said:The lines in your output that just show a directory name are what I am trying to eliminate. I just added a line in my daily backup script that greps out all the copied files and puts them in a new "copied-files.log" that I will have handy to figure out when a file last got copied. I'm just going to leave it at that. I need to stop obsessing over these backups and just let them run.Have you consider having rsync run in the 'quiet' mode and add a command (after rsync finishes) to the shell script that sends the current time to std out? (It has been so long since I last work with BASH that I forget what it would be...)EDIT: Edited June 12, 20251 yr by Frank1940
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.