tar cygwin64/ from old to new computer?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

tar cygwin64/ from old to new computer?

Lester Ingber-3
I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
old c:/cygwin64/ onto a flash SSD USB drive e:/ .
cd c:/
tar cfp - cygwin64 > e:/cygwin64.tar &
Then e:/cygwin64.tar would be mounted on my new computer.

I'm assuming that there is not actual install required, e.g., having to
run setup-x86_64.exe first on the new computer?


--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Hans-Bernhard Bröker
Am 25.11.2018 um 15:38 schrieb Lester Ingber:
> I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
> to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
> old c:/cygwin64/ onto a flash SSD USB drive e:/ .
> cd c:/
> tar cfp - cygwin64 > e:/cygwin64.tar &
> Then e:/cygwin64.tar would be mounted on my new computer.

You're overlooking a chicken-and-egg problem there: your new computer
has no 'tar' to unpack that file.

> I'm assuming that there is not actual install required, e.g., having to
> run setup-x86_64.exe first on the new computer?

That assumption is incorrect.

If your in-house network really is so significantly faster than outside
internet that this makes a difference, what you can usefully copy over
from one machine to the other would be setup.exe's package cache
directory tree.  Other than that, there's really no workable short cut
compared to simply running setup.

--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Achim Gratz
In reply to this post by Lester Ingber-3
Lester Ingber writes:
> I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
> to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
> old c:/cygwin64/ onto a flash SSD USB drive e:/ .
> cd c:/
> tar cfp - cygwin64 > e:/cygwin64.tar &
> Then e:/cygwin64.tar would be mounted on my new computer.

That may or may not work, but please don't (especially not if there's a
chance that the old Thinkpad will be used in parallel to the new one).
What you do want to keep is any files you have added/edited, but you'll
have to check if these edits are still valid.

> I'm assuming that there is not actual install required, e.g., having to
> run setup-x86_64.exe first on the new computer?

The thing you can do is drop the install.db file from the old computer
to where it would be in the new (before or after a Base install),
nulling all the version strings (I've posted an example of how to do
that on this list some time ago).  Then setup.exe will find and
"upgrade" for all those packages you've had installed previously.
However, it may not be the worst idea to drop packages that you don't
actually use anymore, so a fresh install may not be a bad idea.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Andrey Repin
In reply to this post by Lester Ingber-3
Greetings, Lester Ingber!

> I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
> to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
> old c:/cygwin64/ onto a flash SSD USB drive e:/ .
> cd c:/
> tar cfp - cygwin64 > e:/cygwin64.tar &
> Then e:/cygwin64.tar would be mounted on my new computer.

> I'm assuming that there is not actual install required,

Depends what you mean by "install".
One of the postinstall processes is DLL rebasing, which is crucial for working
Cygwin installation.

> e.g., having to run setup-x86_64.exe first on the new computer?

I strongly suggest installing anew, as other prople suggested.
You can take a shortcut by pulling the installed.db out of old setup, but take
care.

And yes, backing up your existing installation is still a good idea.


--
With best regards,
Andrey Repin
Sunday, November 25, 2018 21:46:59

Sorry for my terrible english...


--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer:

L A Walsh
In reply to this post by Hans-Bernhard Bröker


On 11/25/2018 9:08 AM, Hans-Bernhard Bröker wrote:

> Am 25.11.2018 um 15:38 schrieb Lester Ingber:
>> I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
>> to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
>> old c:/cygwin64/ onto a flash SSD USB drive e:/ .
>> cd c:/
>> tar cfp - cygwin64 > e:/cygwin64.tar &
>> Then e:/cygwin64.tar would be mounted on my new computer.
>
> You're overlooking a chicken-and-egg problem there: your new computer
> has no 'tar' to unpack that file.
---
        Hmm...can't tar it, but he could drag&drop from Explorer
like he was moving the image (but do a copy instead).

        It should pick up everything, as that's what explorer
would do.  

        One caveat.  if you have a /etc/passwd + group...
you will need to change the entries for local users on the disk cuz
your computer's "machine id" has changed, and local accounts will
get a different UID because of that.  If you don't use the /etc/passwd
and group...then it might just work...though there will need to be
some entry in the registry.  Might be easiest to install an empty
cygwin on new machine (minimal install, only required packages),
then copy your old cygwin-dir on top of the new one.

        The worst that could happen is you'd have to reinstall the
normal way. (Obviously you don't destroy old image before new image
is verified as working).


--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Lester Ingber-3
In reply to this post by Lester Ingber-3
Andrey:

Hi. As I understand this now:
On the new PC I use Powershell (as Admin) to run setup-x86_64.exe for the Base setup.

From the old PC I can use the /etc/setup/installed.db file in the new machine at the same location.

On the old machine, 5-6 years ago I used c:/cygwin64/ for the top directory, but now I'll use c:/cygwin/ .  I don't think this affects anything.

I'll tar up all my /usr/local/ files to drop into the new PC.

I didn't see the posting referred to by Achim, but I think all I need is the above.

Thanks.

Lester


--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer:

Andrey Repin
In reply to this post by L A Walsh
Greetings, L A Walsh!



> On 11/25/2018 9:08 AM, Hans-Bernhard Bröker wrote:
>> Am 25.11.2018 um 15:38 schrieb Lester Ingber:
>>> I'd like to simply transfer my cygwin64/ directory from my old Thinkpad
>>> to my new Thinkpad, both running Win 10 x64 Pro.  E.g., I would put my
>>> old c:/cygwin64/ onto a flash SSD USB drive e:/ .
>>> cd c:/
>>> tar cfp - cygwin64 > e:/cygwin64.tar &
>>> Then e:/cygwin64.tar would be mounted on my new computer.
>>
>> You're overlooking a chicken-and-egg problem there: your new computer
>> has no 'tar' to unpack that file.
> ---
>         Hmm...can't tar it, but he could drag&drop from Explorer
> like he was moving the image (but do a copy instead).

It would screw permissions on Cygwin files/directories.

>         It should pick up everything, as that's what explorer
> would do.  

>         One caveat.  if you have a /etc/passwd + group...
> you will need to change the entries for local users on the disk cuz
> your computer's "machine id" has changed, and local accounts will
> get a different UID because of that.  If you don't use the /etc/passwd
> and group...then it might just work...though there will need to be
> some entry in the registry.  Might be easiest to install an empty
> cygwin on new machine (minimal install, only required packages),
> then copy your old cygwin-dir on top of the new one.

>         The worst that could happen is you'd have to reinstall the
> normal way. (Obviously you don't destroy old image before new image
> is verified as working).


--
With best regards,
Andrey Repin
Sunday, November 25, 2018 22:57:46

Sorry for my terrible english...
--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Achim Gratz
In reply to this post by Lester Ingber-3
Lester Ingber writes:
> On the new PC I use Powershell (as Admin) to run setup-x86_64.exe for the Base setup.

Not absolutely needed, but it creates all the directories and files you
need correctly, so it's a good start.

> From the old PC I can use the /etc/setup/installed.db file in the new machine at the same location.

…then modify it as described and then run setup.exe again and let it
"update" your installation.  If you had any services running you'll also
need to run their initialization scripts again.

> On the old machine, 5-6 years ago I used c:/cygwin64/ for the top
> directory, but now I'll use c:/cygwin/ .  I don't think this affects
> anything.

Not unless you have scripts that use the Windows path someplace.  You'll
find out soon enough, I think.

> I'll tar up all my /usr/local/ files to drop into the new PC.
>
> I didn't see the posting referred to by Achim, but I think all I need is the above.

It was this one:

  https://sourceware.org/ml/cygwin/2015-09/msg00023.html

You need a slight modification of the sed script however due to a more
recent format change of installed.db:

sed -re 's/^(.+) .+ ([01])$/\1 \1-0-0.tar.bz \2/' installed.db.old > /etc/setup/installed.db



Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

KARL BOTTS

This may not be strictly supported, but I have been doing it for at least 10
years:

Once I have a new host network accessible from the old, I simply copy
c:/cygwin from old to new.
Access can be via UNC, mapped drive, whatever.  I normally use 'cp -a' to do
the copy, but have done it other ways.  (Do not use Win copy commands, they
mess up links.)

Then I set a few envars (by hand, via dialog box) on the new: add c:/cygwin to
the PATH, set HOME and CYGWIN.  I keep a home dir in cloud svn, shared across
all machines, to which HOME points, which I check out onto the new, by remote.
 Make a couple shortcuts to start bash, mintty, like that.

And up she comes.  I have a file of notes to follow, but really, the above is
about it.

Thereafter, I run CygSetup on one machine, make sure I like it, then just copy
c:/cygwin to the other machines again.  (Of course, copy it first, then rename
it on the dest with a DOS command, with cygwin shut down.)  I do that about
once a year.  I have about 6 active machines -- home, work, Acure -- and this
keeps them all in sync.

Compared to Visual Studio and ilk, maintaining cygwin is a breeze this way.


---
Karl Botts, [hidden email]



--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer:

L A Walsh
In reply to this post by Andrey Repin


On 11/25/2018 11:58 AM, Andrey Repin wrote:
> Greetings, L A Walsh!
>> ---
>>         Hmm...can't tar it, but he could drag&drop from Explorer
>> like he was moving the image (but do a copy instead).
>
> It would screw permissions on Cygwin files/directories.
---
        Perhaps, I haven't tried this particular use case,
however, usually it just duplicates them.

        Think about the local case.  There it just does a rename.
I don't think they would deliberately allow custom ACL's to be tossed
just because the copy was to a different device.

        But, once you had the files in place, wouldn't an rsync
from old to new, fix up just the ACL's?

        If rsync won't work, then use "cp":

  > cp -rd --attributes-only /old /new

        Is there a reason why that wouldn't (or shouldn't)
work?




--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Gilbert St. Firmin
In reply to this post by Lester Ingber-3
On: Sun, 25 Nov 2018 18:08:35 +0100,
Hans-Bernhard Bröker <HBBroeker at t-online dot de> wrote:
You're overlooking a chicken-and-egg problem there: your new computer has
no 'tar' to unpack that file.

Could the native Windows version of 7-zip be used on both old and new
computers?  Also, perhaps the Windows Image Format (WIM) could be used
instead, presuming UUIDs would not be an issue if both computers shared
identical machine names and accounts.

Just curious.

Gilbert P. St. Firmin

--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Hans-Bernhard Bröker
Am 26.11.2018 um 21:32 schrieb Gilbert St. Firmin:

> Could the native Windows version of 7-zip be used on both old and new
> computers?

Possibly.  If that can be taught to copy all the attributes used by
Cygwin, without running into the usual problems we see whenever Windows
tools are used to handle those.  But I really very much doubt it.  This
really is a full blown chicken-and-egg situation: the only tools really
known to be able to correctly copy Cygwin files including all their ACLs
are Cygwin itself, and its installer.  All other tools are suspect.

It all comes back down to what I wrote in my initial answer: is remote
access to a Cygwin mirror server really so much slower than your local
network that there's even any gain to be had from going this untested
route? I.e. why even risk this?

--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

Andrey Repin
In reply to this post by Gilbert St. Firmin
Greetings, Gilbert St. Firmin!

> On: Sun, 25 Nov 2018 18:08:35 +0100,
> Hans-Bernhard Bröker <HBBroeker at t-online dot de> wrote:
> You're overlooking a chicken-and-egg problem there: your new computer has
> no 'tar' to unpack that file.

> Could the native Windows version of 7-zip be used on both old and new
> computers?  Also, perhaps the Windows Image Format (WIM) could be used
> instead, presuming UUIDs would not be an issue if both computers shared
> identical machine names and accounts.

> Just curious.

Don't be, just install Cygwin the recommended way.
The task of system administrator is to solve problems, not to create them.
And trying to circumvent regular installation process is sure asking for
trouble one way or another.


--
With best regards,
Andrey Repin
Tuesday, November 27, 2018 18:11:16

Sorry for my terrible english...
--
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

Reply | Threaded
Open this post in threaded view
|

Re: tar cygwin64/ from old to new computer?

cyg Simple
On 11/27/2018 10:12 AM, Andrey Repin wrote:

> Greetings, Gilbert St. Firmin!
>
>> On: Sun, 25 Nov 2018 18:08:35 +0100,
>> Hans-Bernhard Bröker <HBBroeker at t-online dot de> wrote:
>> You're overlooking a chicken-and-egg problem there: your new computer has
>> no 'tar' to unpack that file.
>
>> Could the native Windows version of 7-zip be used on both old and new
>> computers?  Also, perhaps the Windows Image Format (WIM) could be used
>> instead, presuming UUIDs would not be an issue if both computers shared
>> identical machine names and accounts.
>
>> Just curious.
>
> Don't be, just install Cygwin the recommended way.
> The task of system administrator is to solve problems, not to create them.
> And trying to circumvent regular installation process is sure asking for
> trouble one way or another.
>

In other words, try it, if it works for you great, if it doesn't don't
come here with your problems until you've attempted the described process.

--
cyg Simple

--
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