delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/08/18:00:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Mon, 8 Mar 2010 18:00:34 -0500
Subject: RE: Installing a "copy" of an installation on a new computer
Message-ID: <0105D5C1E0353146B1B222348B0411A208B5EEA203@NIHMLBX02.nih.gov>
References: <c5341f401003080045n2fbf9f68g288693774337d553 AT mail DOT gmail DOT com>
In-Reply-To: <c5341f401003080045n2fbf9f68g288693774337d553@mail.gmail.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Olle Olsson sent the following at Monday, March 08, 2010 3:46 AM
>Have good installations of cygwin on some computers. But these were
>manually setup using the interactive cygwin setup tool. Always forgot to
>install a couple of packages.
>
>Can a fresh install be made using an existing installation as template?
>Is there a way to use the contents of an existing /etc/setup to
>download/install on a fresh machine. Or something like that.
>
>That is, I want to do download/install in a more programmatic way, as an
>alternative to a binary copy machine-to-machine.

You might think about just copying c:\cygwin.
  - If the receiving machines have the same disk drives as the master, you
    won't need to change /etc/fstab.
  - If any environmental variables were set in Windows on the master machine
    they'll need to be set on the cloned machines.
  - Ditto with anything in the registry.

I use mirror.exe <http://home.cs.tum.edu/~jain/> to copy from C:\cygwin on
my desktop to H:\cygwin on the network, which I use when logged in remotely.
Then I use mirror.exe it to copy from H:\cygwin to C:\cygwin on my laptop.
Once I got the environmental variable setup, I just have to be careful to
replicate customizations made on the laptop to the desktop before I run the
batch file that calls mirror.exe.  However, one can tell mirror.exe to
ignore directories like c:\cygwim\home.  And of course, you don't want to
have cygwin processes running of the executable involved are being updated.

As a variation, one might copy with xcopy (which I seem to remember has some
advantage over mirror when dealing with read-only or system attributes.) and
then run mirror to delete files that have been removed from your source.

Here's what I run.

@echo off
xcopy c:\cygwin\*.lnk h:\cygwin /d /s /v /c /i /f /g /h /r /k /y
mirror c:\cygwin h:\cygwin -if=3Ddirectory_to_ignore -if=3Dignore_also

IWFM.  YMMV.

Good luck.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019