On Jul 17, 2015 7:16 AM, "Nicolas George" <[email protected]> wrote: > > Le nonidi 29 messidor, an CCXXIII, Andrew McGlashan a écrit : > > Not sure if this is relevant enough, but I have a method to keep > > "source" files -- in this case .forward files in a controlled directory; > > if any of these differ from the target locations, then I save the target > > location file with a dated version and copy in the controlled source > > copy. This way I only get new files if they are changed, you could use > > a similar method for the backups, that is only copying files to the > > backup area if they are different to the current copy in the source area. > > If your files were all isolated in small hierarchies, I would have suggested > to use Git instead, but with dotfiles in several home directories, that is > not practical. And I realize you already considered that. >
Heh, I symlink my dotfiles to the repo that contains them. No issues here. > On the other hand, I suspect rsync (with option -c) can detect the files > that need updating in a simpler way. > [snipped all of the bash stuff you don't need because you have rsync] > > To do that kind of thing reliably, you need to create a temporary file and > rename it once it is complete. Just use rsync for the copy, it does that by > default. > > > fi > > done > > ) And done :)

