how to save multiple copies of a file
Greetings I'm wanting to save a file (from a text editor) in multiple locations simply and easily. I've looked at 'parallel' and ran into the idea of symlink chains but so far parallel seems more for multiple in and out and symlink chains besides a reference I can't find more information. I think the rsync and cron would likely create a plethora of files which would then need cleaning so as not to waste too much space. So - - - - I dunno where to look next - - - please? TIA
On 19/11/2020 10.54, o1bigtenor via talk wrote:
Greetings
I'm wanting to save a file (from a text editor) in multiple locations simply and easily.
I've looked at 'parallel' and ran into the idea of symlink chains but so far parallel seems more for multiple in and out and symlink chains besides a reference I can't find more information. I think the rsync and cron would likely create a plethora of files which would then need cleaning so as not to waste too much space. So - - - - I dunno where to look next - - - please?
TIA --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
I think anyone solving this problem would ask.. 1) Are the mirror locations on the same filesystem? 2) Are the mirror locations on the same host? 3) Is there a hierarchy of precedence (e.g. one rw file and multiple ro copies)? One location to many. Many to many? 4) If the answer to 3) is no, will you have to merge? Naively, 1) can be solved by links, 2-3) by rsync (possibly with --delete), 4) would require something like meld. You can address the cron issue more intelligently with scripting inotify if the dirs involved are somewhat static. I have implemented cron scheduled sync of whole directories over the net using a mirror and mirrored directory on each peer, rsync and ssh-agent, with merges performed manually. But at that point you might as well use git, unless you can't. Hope this offers some ideas.. -- Michael Galea
participants (2)
-
Michael Galea -
o1bigtenor