You are not logged in.
Pages: 1
Whats the easiest and/or best way to keep 2 subdirectories on 2 different PCs in sync for the following two situations:
In one case, only one directory changes its contents, in the other, either directory could be modified.
After sync'ing, the contents of the directories should be identical.
Offline
I think rsync could do this. But there are other (desktop) solutions as well. For example a program called Krusader could handle this as well (manually) .
Out / Gone
Mirgrating all my machines off ArchLinux . No longer part of the ArchLinux community / users .
Done. Goodbye.
Offline
rsync is THE application for that job, it was created for that !
Offline
In one case, only one directory changes its contents, in the other, either directory could be modified.
How often does sync'ing need to happen? If it's once a day (or even hourly) place the following code in, say, /etc/cron.daily/sync.cron:
#/bin/bash
rsync -az -e ssh /source/directory root@otherhost:/destination/
Then, setup ssh keys so no password is required for root, from the source host to the destination host ('man ssh').
That would take care of the first case. For the bi-directional case, there is a -u (--update) option in rsync that may help. (Setup a similar cron job and ssh keys in the other direction.)
However, would an NFS or Samba share work for your situation? (i.e. not needing to sync over the Internet). If you setup NFT or Samba, both hosts could use the filesystem and sync'ing would be taken care of. You could still rsync the share contents to the client host, as a nightly backup, using rsync.
Offline
There's also dirsync - but it seems it works only locally, so it'd come handy for you only if you were using NFS/Samba mounts.
Offline
Pages: 1