Directory/File synchronization across systems
Posted by lloyd on Thu 21 Apr 2011 at 16:26
Both Debian Lenny and the system I've been running it on are now long in the tooth. So I've just brought up a Debian Squeeze-based system on a new and more capable box. I'd like to keep files in sync across the two hosts and would look for suggestions on doing that.
For awhile, at least, I'd like to keep the home directories and files in sync across the two systems. E.g., if I edit or create a file on one, I'd like to sync it over to the other and vice-versa. I'm looking for two wins here: 1) home dir and file consistency while I wring out the new machine; another layer of back up for my home dir and files until I can get a more permanent back-up regime on the new machine.
It seems I have a number of possible options:
rsync - http://en.wikipedia.org/wiki/Rsync
Unison - http://www.cis.upenn.edu/~bcpierce/unison/
git sync - http://code.google.com/p/git-sync/
persy - http://persy.digitalkultur.net/
I'd be much grateful for user experiences and recommendations.
Many thanks and best wishes,
LRP
The graphical user interface is good. The speed is not as good as rsync's though.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Best regards!
morphium
[ Parent | Reply to this comment ]
* avoid major boo-boos by synchronizing your boxes synchronized: use some NTP daemon.
* any solution copying date (instead of mounting an unique filesystem through some network) implies some latency (during copy) BUT somewhat backups the data.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
We used to use amanda for backups but now use RBME which is a tool that uses rsync, again in a cron to sync to a luks crypt encrypted esata hd.
This works well and after moving to non 5 year old scsi raid array to nice sas disks with lots of cores - pretty fast. See about 50MB/s on syncs which is quite nice.
sno
[ Parent | Reply to this comment ]
[ Send Message | View Steve's Scratchpad | View Weblogs ]
DRBD is well known, well proven, and simple to use. But I suspect it gets little use because of the limitation:
- It may be only mounted by one of the hosts at a time.
So yes, you get an up to date copy on the remote side, but you cannot use it unless you demote the previous master.
[ Parent | Reply to this comment ]
1: cs:Connected st:Primary/Primary ds:UpToDate/UpToDate C r---
ns:1811561548 nr:99569519 dw:1911131067 dr:25270137 al:3356 bm:5273 lo:0 pe:0 ua:0 ap:0
resync: used:0/61 hits:5394183 misses:5273 starving:0 dirty:0 changed:5273
act_log: used:0/127 hits:1546741620 misses:3356 starving:0 dirty:0 changed:3356
Then use an appropriate filesystem - I've gone with OCFS2. at that point, you can mount on both sides, and write to both sides.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Cons: it's in Java
www.wuala.com/
[ Parent | Reply to this comment ]
If you are interested in sync replication (both hosts online and connected at the same time) then also check out sshfs in addition to nfs.
[ Parent | Reply to this comment ]
Here is what I do.
It borrows from the ancient UNIX way of tarring up an entire system and restoring it.
For example, I go to the root of the source server.
Then I issue the command: tar cvpzf [name-of-archive-date-time-initials].tgz --exclude=/proc --exclude=/lost+found --exclude=/name-of-archive-date-time-initials.tgz --exclude=/mnt --exclude=/sys --exclude=/(others-you-deem-apply) /
Copy backup to an external drive or internal spare. Whatever you have available.
On the target server, format the drives in the same as the source.
Copy the name-of-archive-date-time-initials.tgz to the root of the target drive.
Then issue the following command: tar xvpfz name-of-archive-date-time-initials.tgz -C /
This will overlay the old over the new bare install.
Reboot when finished.
You may or may not need to once over the configuration files.
Depending on the size, speed, I/O of your hard drives on both the source and target servers if may or may not take time.
Hope this adds an option to your copying.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
All the best,
LRP
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View Weblogs ]
Now you all should have a look at git-annex, as it looks like it will be a real good piece of software.
Have a look at Git Annex home page
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]