Unix Technical Forum

OT: synchronizing two disconnected systems

This is a discussion on OT: synchronizing two disconnected systems within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Have two machines, one is only accessable via memory stick or external drives (no network) and would like to ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 05:37 PM
ray
 
Posts: n/a
Default OT: synchronizing two disconnected systems

Have two machines, one is only accessable via memory stick or external
drives (no network) and would like to have a synchronized directory
structure as much as possible with a second box.

I'm using a 512MB flash drive and copying stuff manually... but that
won't "replicate" deletes and isn't very efficient. Any suggestions on
how I could "automate" it a bit more?

The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
source and destination.... I was thinking a "catalog" of files or
something... trying to avoid reinventing the wheel, but I suspect this
will end up being a homegrown script of some kind...

Ray
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 05:37 PM
Douglas Mayne
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

On Wed, 10 May 2006 09:18:04 -0500, ray wrote:

> Have two machines, one is only accessable via memory stick or external
> drives (no network) and would like to have a synchronized directory
> structure as much as possible with a second box.
>
> I'm using a 512MB flash drive and copying stuff manually... but that
> won't "replicate" deletes and isn't very efficient. Any suggestions on
> how I could "automate" it a bit more?
>
> The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
> source and destination.... I was thinking a "catalog" of files or
> something... trying to avoid reinventing the wheel, but I suspect this
> will end up being a homegrown script of some kind...
>
> Ray
>

I've done a lot of reinventing the wheel, myself...

I think you need a tool that does comparisons between file listings and
returns 4 reports. The comparison would be between two listings:

List 1: A table of files and md5sums for files on box1
List 2: A table of files and md5sums for files on box2

Then, generate 4 reports:

Report 1: Entries which match exactly (name and md5sum)
Report 2: Entries whose names match, but which have different md5sums
Report 3: Entries whose names appear only on list 1
Report 4: Entries whose names appear only on list 2

You can then take the required actions to syncronize your boxes based on
the information obtained.

Generating the reports can be done via database tool, or speaking of
reinventing the wheel, I wrote a script called comm2.scr which does this
for text files. Let me know if you'd like me to post the source.

BTW, I think this might be more difficult than it has to be, and prone to
human error. The easiest method would be to install network cards and use
rsync. Any chance of that?

--
Douglas Mayne



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 05:37 PM
Sylvain Robitaille
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

ray wrote:

> Have two machines, one is only accessable via memory stick or external
> drives (no network) and would like to have a synchronized directory
> structure as much as possible with a second box.


Are you by any chance able to connect these two systems by serial ports?
If so you might be able to getwhat you're after by communicating between
them that way, or even setting up a SLIP connection between them.

--
----------------------------------------------------------------------
Sylvain Robitaille syl@alcor.concordia.ca

Systems and Network analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 05:37 PM
+Alan Hicks+
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In alt.os.linux.slackware, ray dared to utter,
> I'm using a 512MB flash drive and copying stuff manually... but that
> won't "replicate" deletes and isn't very efficient. Any suggestions on
> how I could "automate" it a bit more?


svn?

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFEYgWFz8zcalmVmBkRAvYVAKDR+AZvlcAAiunu8Igv81 b5LfA/9QCgzm4w
Oy+eAdS+EZl8b445HxGXGjY=
=46rZ
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 05:38 PM
ray
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

Sylvain Robitaille wrote:
> ray wrote:
>
>> Have two machines, one is only accessable via memory stick or external
>> drives (no network) and would like to have a synchronized directory
>> structure as much as possible with a second box.

>
> Are you by any chance able to connect these two systems by serial ports?
> If so you might be able to getwhat you're after by communicating between
> them that way, or even setting up a SLIP connection between them.
>


no. Two physical locations, and internet access is not practical for
one box.

It's not a real-time sync, and I know it's manual labor, I can live with
that...

Ray
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 05:38 PM
ray
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

Douglas Mayne wrote:
>>

> I've done a lot of reinventing the wheel, myself...
>
> I think you need a tool that does comparisons between file listings and
> returns 4 reports. The comparison would be between two listings:
>
> List 1: A table of files and md5sums for files on box1
> List 2: A table of files and md5sums for files on box2
>
> Then, generate 4 reports:
>
> Report 1: Entries which match exactly (name and md5sum)
> Report 2: Entries whose names match, but which have different md5sums
> Report 3: Entries whose names appear only on list 1
> Report 4: Entries whose names appear only on list 2
>



That kinda confirms what I was planning on doing. I'm wondering if I
can tweak backup software to help me... no biggie. I knew it was going
to be a lot of manual labor... the second machine is mostly read only,
just trying to keep them in sync.

Ray
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 05:38 PM
Damjan
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

> Have two machines, one is only accessable via memory stick or external
> drives (no network) and would like to have a synchronized directory
> structure as much as possible with a second box.
>
> I'm using a 512MB flash drive and copying stuff manually... but that
> won't "replicate" deletes and isn't very efficient. Any suggestions on
> how I could "automate" it a bit more?
>
> The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
> source and destination.... I was thinking a "catalog" of files or
> something... trying to avoid reinventing the wheel, but I suspect this
> will end up being a homegrown script of some kind...


I have not tried it yet, but unison should do it.
http://freshmeat.net/projects/unison/

--
damjan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 05:38 PM
ray
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

Damjan wrote:
>>
>> The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
>> source and destination.... I was thinking a "catalog" of files or
>> something... trying to avoid reinventing the wheel, but I suspect this
>> will end up being a homegrown script of some kind...

>
> I have not tried it yet, but unison should do it.
> http://freshmeat.net/projects/unison/
>

"Conflicting updates are detected and displayed. Unison can communicate
through a direct socket link or through an rsh/ssh tunnel. It uses
network bandwidth efficiently."

Sorry, but that's the same problem as using rsync etc... the one machine
has no network access due to location (rural) so I don't have an easy
(non-PITA) way of hooking the two machines together over ANY link. Just
sneakernet.

It looks like it'll be some kind of "catalog" to track changes for
replicating/deleting/copying the two machines.

Thanks anyway....
Ray
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 05:38 PM
Old Man
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

ray wrote:

> Have two machines, one is only accessable via memory stick or external
> drives (no network) and would like to have a synchronized directory
> structure as much as possible with a second box.
>
> I'm using a 512MB flash drive and copying stuff manually... but that
> won't "replicate" deletes and isn't very efficient. Any suggestions on
> how I could "automate" it a bit more?
>
> The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
> source and destination.... I was thinking a "catalog" of files or
> something... trying to avoid reinventing the wheel, but I suspect this
> will end up being a homegrown script of some kind...
>
> Ray


rsync does not require a network connection. It will happily work with a
local source and a local destination.

rsync -av --delete /src /dest

at the "source machine":
rsync -av --delete /directory_to_be_synced /mnt/removable_disk

at the "destination machine:"
rsync -av --delete /mnt/removable_disk /directory_to_be_synced

Requires only that directory_to_be_synced is no larger than removable_disk.
No?

--
Old Man
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 05:38 PM
Laurence Pithie
 
Posts: n/a
Default Re: OT: synchronizing two disconnected systems

ray <rollingviolation@example.com> writes:

> Have two machines, one is only accessable via memory stick or external
> drives (no network) and would like to have a synchronized directory
> structure as much as possible with a second box.
>
> I'm using a 512MB flash drive and copying stuff manually... but that
> won't "replicate" deletes and isn't very efficient. Any suggestions
> on how I could "automate" it a bit more?
>
> The killer is stuff like cp/scp/ftp/rsync etc.. all need access to the
> source and destination.... I was thinking a "catalog" of files or
> something... trying to avoid reinventing the wheel, but I suspect this
> will end up being a homegrown script of some kind...
>
> Ray


Can't you put source and destination on the memory stick? I do that
with a cvs repository I have. Major pita but it seems to work :-)
--
Chicago law prohibits eating in a place that is on fire.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com