public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Switch to a new PC
@ 2022-02-04 10:09 Vanda Vodkamilkevich
  2022-02-04 10:26 ` Russell VT
  0 siblings, 1 reply; 9+ messages in thread
From: Vanda Vodkamilkevich @ 2022-02-04 10:09 UTC (permalink / raw)
  To: cygwin

Hi guys,

Probably a known issue (I remember on this list some trick using the
installed.db file) but I want to backup my whole cygwin tree (on a network
drive) before switching PC and without losing anything... What is the best
method / tool?
(currently trying with FreeFileSync but it is excluding files in a strange
way...)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-04 10:09 Switch to a new PC Vanda Vodkamilkevich
@ 2022-02-04 10:26 ` Russell VT
  2022-02-04 10:52   ` Thomas Wolff
  2022-02-04 17:15   ` Brian Inglis
  0 siblings, 2 replies; 9+ messages in thread
From: Russell VT @ 2022-02-04 10:26 UTC (permalink / raw)
  To: Vanda Vodkamilkevich; +Cc: cygwin

This is "a religious" question, as there are many different "sworn" ways to
do it.

The "old reliable" method, if you have both filesystems available... at
least off the top of my head...

cd / ; tar -cvf - / | (cd /path/to/other/disk ; tar -xvfp -)


There are also many other solutions using things like cpio and dd... and
technically, you can probably even do a "cp -pr /source /dest" or similar.
There are also better "purist" methods using setup to save the current list
of packages, and then pipe that to a new setup to install those same
packages, all from the command line (it's probably "the best," but you'll
have to reconfigure everything, too)

Hope that gives you a few different starting points to play with...

R VT



On Fri, Feb 4, 2022 at 2:10 AM Vanda Vodkamilkevich <
vanda.vodkamilkevich@gmail.com> wrote:

> Hi guys,
>
> Probably a known issue (I remember on this list some trick using the
> installed.db file) but I want to backup my whole cygwin tree (on a network
> drive) before switching PC and without losing anything... What is the best
> method / tool?
> (currently trying with FreeFileSync but it is excluding files in a strange
> way...)
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>


-- 
Russell M. Van Tassell <russellvt@gmail.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-04 10:26 ` Russell VT
@ 2022-02-04 10:52   ` Thomas Wolff
  2022-02-04 12:11     ` marco atzeri
  2022-02-04 17:15   ` Brian Inglis
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Wolff @ 2022-02-04 10:52 UTC (permalink / raw)
  To: cygwin


Am 04.02.2022 um 11:26 schrieb Russell VT:
> This is "a religious" question, as there are many different "sworn" ways to
> do it.
>
> The "old reliable" method, if you have both filesystems available... at
> least off the top of my head...
>
> cd / ; tar -cvf - / | (cd /path/to/other/disk ; tar -xvfp -)
>
>
> There are also many other solutions using things like cpio and dd... and
> technically, you can probably even do a "cp -pr /source /dest" or similar.
> There are also better "purist" methods using setup to save the current list
> of packages, and then pipe that to a new setup to install those same
> packages, all from the command line (it's probably "the best," but you'll
> have to reconfigure everything, too)
>
> Hope that gives you a few different starting points to play with...
I wouldn't expect most tools to work on special files in /dev. Even tar 
fails on /proc, it would begin to pack your local registry...
Make a basic installation on the new system, then sync the rest.
An even cleaner way might be to clone your installation via setup, using 
/etc/setup/installed.db - maybe someone has a script for that -
and then just sync the /home hierarchy.
Thomas

>
> R VT
>
>
>
> On Fri, Feb 4, 2022 at 2:10 AM Vanda Vodkamilkevich <
> vanda.vodkamilkevich@gmail.com> wrote:
>
>> Hi guys,
>>
>> Probably a known issue (I remember on this list some trick using the
>> installed.db file) but I want to backup my whole cygwin tree (on a network
>> drive) before switching PC and without losing anything... What is the best
>> method / tool?
>> (currently trying with FreeFileSync but it is excluding files in a strange
>> way...)
>>
>> --
>> Problem reports:      https://cygwin.com/problems.html
>> FAQ:                  https://cygwin.com/faq/
>> Documentation:        https://cygwin.com/docs.html
>> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-04 10:52   ` Thomas Wolff
@ 2022-02-04 12:11     ` marco atzeri
  2022-02-09 15:12       ` Vanda Vodkamilkevich
  0 siblings, 1 reply; 9+ messages in thread
From: marco atzeri @ 2022-02-04 12:11 UTC (permalink / raw)
  To: Thomas Wolff; +Cc: The Cygwin Mailing List

On Fri, Feb 4, 2022 at 11:52 AM Thomas Wolff  wrote:

> I wouldn't expect most tools to work on special files in /dev. Even tar
> fails on /proc, it would begin to pack your local registry...
> Make a basic installation on the new system, then sync the rest.
> An even cleaner way might be to clone your installation via setup, using
> /etc/setup/installed.db - maybe someone has a script for that -
> and then just sync the /home hierarchy.

script I wrote some time ago for re-installation

https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/


> Thomas
 Regards
Marco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-04 10:26 ` Russell VT
  2022-02-04 10:52   ` Thomas Wolff
@ 2022-02-04 17:15   ` Brian Inglis
  1 sibling, 0 replies; 9+ messages in thread
From: Brian Inglis @ 2022-02-04 17:15 UTC (permalink / raw)
  To: cygwin

On 2022-02-04 03:26, Russell VT wrote:
> This is "a religious" question, as there are many different "sworn" ways to
> do it.
> 
> The "old reliable" method, if you have both filesystems available... at
> least off the top of my head...
> 
> cd / ; tar -cvf - / | (cd /path/to/other/disk ; tar -xvfp -)

	$ tar -c -C /from/ -f - | ssh host tar -x -C /to/ -f -

where compression arguments e.g. -J are advisable if over a WAN, "ssh 
host" is optional, and -v really slows things down, especially if used 
on both sides or over a WAN.

For Cygwin, --exclude /cygdrive, /dev, /proc, /tmp, /var/log and maybe 
some others, so better to add to an --exclude-from FILE:

	$ info tar exclude

and don't forget exclusions must omit /from/ and /to/ paths but may 
include shell wildcard patterns "*", "?", "[...]", "[!...]", and 
[?*+@!](...|...) if shopt extglob enabled:

	$ info bash pattern

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-04 12:11     ` marco atzeri
@ 2022-02-09 15:12       ` Vanda Vodkamilkevich
  2022-02-09 18:05         ` Adam Dinwoodie
  0 siblings, 1 reply; 9+ messages in thread
From: Vanda Vodkamilkevich @ 2022-02-09 15:12 UTC (permalink / raw)
  To: cygwin

On Fri, Feb 4, 2022 at 13:12  AM  marco.atzeri  wrote:

>> I wouldn't expect most tools to work on special files in /dev. Even tar
>> fails on /proc, it would begin to pack your local registry...
>> Make a basic installation on the new system, then sync the rest.
>> An even cleaner way might be to clone your installation via setup, using
>> /etc/setup/installed.db - maybe someone has a script for that -
>> and then just sync the /home hierarchy.
>
>script I wrote some time ago for re-installation
>
>
https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/
>
>
Just for the record:
I just played with the script provided in stackoverflow which generates a
bat file, and it seems that the behaviour of the '-P' switch of setup  has
changed because now it explicitely needs the version of the package (at
least for me it didn't worked without the version number:  " -P
package=version_as_seen_by_cygcheck") . Can someone (probably Jon Turney)
confirm this usage of the '-P' switch (BTW the mandatory '='  is explained
nowhere - Nor in 'setup -h' or the setup web pages - and can be seen only
in  the source code).
By needing the version number the script on stackoverflow will then
generate a "too long" command in the bat file and it will crash; I had to
modify it manually to split the command line in 4 ...
Note on the script: if you forgot to run it before loosing your cygwin
tree, it can still work after a 'Base' installation if you kept the old
installed.db file and replace (temporary) the actual installed.db with this
one :)

Cheers,


Le ven. 4 févr. 2022 à 13:13, marco atzeri <marco.atzeri@gmail.com> a
écrit :

> On Fri, Feb 4, 2022 at 11:52 AM Thomas Wolff  wrote:
>
> > I wouldn't expect most tools to work on special files in /dev. Even tar
> > fails on /proc, it would begin to pack your local registry...
> > Make a basic installation on the new system, then sync the rest.
> > An even cleaner way might be to clone your installation via setup, using
> > /etc/setup/installed.db - maybe someone has a script for that -
> > and then just sync the /home hierarchy.
>
> script I wrote some time ago for re-installation
>
>
> https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/
>
>
> > Thomas
>  Regards
> Marco
>
> --
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-09 15:12       ` Vanda Vodkamilkevich
@ 2022-02-09 18:05         ` Adam Dinwoodie
  2022-02-10 13:53           ` Jon Turney
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Dinwoodie @ 2022-02-09 18:05 UTC (permalink / raw)
  To: cygwin

On Wed, Feb 09, 2022 at 04:12:28PM +0100, Vanda Vodkamilkevich wrote:
> On Fri, Feb 4, 2022 at 13:12  AM  marco.atzeri  wrote:
> 
> >> I wouldn't expect most tools to work on special files in /dev. Even tar
> >> fails on /proc, it would begin to pack your local registry...
> >> Make a basic installation on the new system, then sync the rest.
> >> An even cleaner way might be to clone your installation via setup, using
> >> /etc/setup/installed.db - maybe someone has a script for that -
> >> and then just sync the /home hierarchy.
> >
> >script I wrote some time ago for re-installation
> >
> >
> https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/
> >
> >
> Just for the record:
> I just played with the script provided in stackoverflow which generates a
> bat file, and it seems that the behaviour of the '-P' switch of setup  has
> changed because now it explicitely needs the version of the package (at
> least for me it didn't worked without the version number:  " -P
> package=version_as_seen_by_cygcheck") . Can someone (probably Jon Turney)
> confirm this usage of the '-P' switch (BTW the mandatory '='  is explained
> nowhere - Nor in 'setup -h' or the setup web pages - and can be seen only
> in  the source code).

I don't think this is correct.  I use the setup program's -P option
regularly, including with the latest 2.917 release, and it successfully
installs packages.  Indeed, I've just tried running it to install
2048-cli (given it's a package I know I don't have installed) and it
successfully installed the package without specifying a version number.

Can you give a bit more information about exactly what commands you're
running, what you're expecting to happen, and what precisely happens
instead?

> By needing the version number the script on stackoverflow will then
> generate a "too long" command in the bat file and it will crash; I had to
> modify it manually to split the command line in 4 ...
> Note on the script: if you forgot to run it before loosing your cygwin
> tree, it can still work after a 'Base' installation if you kept the old
> installed.db file and replace (temporary) the actual installed.db with this
> one :)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-09 18:05         ` Adam Dinwoodie
@ 2022-02-10 13:53           ` Jon Turney
  2022-02-10 14:41             ` Vanda Vodkamilkevich
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Turney @ 2022-02-10 13:53 UTC (permalink / raw)
  To: The Cygwin Mailing List, Vanda Vodkamilkevich

On 09/02/2022 18:05, Adam Dinwoodie wrote:
> On Wed, Feb 09, 2022 at 04:12:28PM +0100, Vanda Vodkamilkevich wrote:
>> On Fri, Feb 4, 2022 at 13:12  AM  marco.atzeri  wrote:
>>
>>>> I wouldn't expect most tools to work on special files in /dev. Even tar
>>>> fails on /proc, it would begin to pack your local registry...
>>>> Make a basic installation on the new system, then sync the rest.
>>>> An even cleaner way might be to clone your installation via setup, using
>>>> /etc/setup/installed.db - maybe someone has a script for that -
>>>> and then just sync the /home hierarchy.
>>>
>>> script I wrote some time ago for re-installation
>>>
>>>
>> https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/
>>>
>>>
>> Just for the record:
>> I just played with the script provided in stackoverflow which generates a
>> bat file, and it seems that the behaviour of the '-P' switch of setup  has
>> changed because now it explicitely needs the version of the package (at
>> least for me it didn't worked without the version number:  " -P
>> package=version_as_seen_by_cygcheck") . Can someone (probably Jon Turney)
>> confirm this usage of the '-P' switch (BTW the mandatory '='  is explained
>> nowhere - Nor in 'setup -h' or the setup web pages - and can be seen only
>> in  the source code).

It's not mandatory.  If you're looking at the source code, you should 
see that the case where '=' is not present is also still handled.

Yes, it should be documented, but so should the rest of the format of 
the string which -P accepts...

> I don't think this is correct.  I use the setup program's -P option
> regularly, including with the latest 2.917 release, and it successfully
> installs packages.  Indeed, I've just tried running it to install
> 2048-cli (given it's a package I know I don't have installed) and it
> successfully installed the package without specifying a version number.
> 
> Can you give a bit more information about exactly what commands you're
> running, what you're expecting to happen, and what precisely happens
> instead?

Yeah, what he said :)

That's not to say that -P isn't picky in the precise format of the 
package list it accepts (that might have unfortunately changed), and the 
error reporting when the package list doesn't meet it's expectations is 
weak, but it works for me, so an instance of a setup invocation which 
fails because it doesn't contain '=' would be very helpful.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Switch to a new PC
  2022-02-10 13:53           ` Jon Turney
@ 2022-02-10 14:41             ` Vanda Vodkamilkevich
  0 siblings, 0 replies; 9+ messages in thread
From: Vanda Vodkamilkevich @ 2022-02-10 14:41 UTC (permalink / raw)
  To: Jon Turney; +Cc: The Cygwin Mailing List

I've retried with the 'P' option and now I get it: when using this option
the package selection page doesn't show it as 'selected' (no version or
action seen in the 'New' column') but if you click 'next' it works!  I
don't know how to send a screenshot but I hope that you get what I mean.

When I made my first attempt I was confused with this display and I just
stopped instead of continuing... Maybe the graphical interface should
reflect somehow the '-P' chosen packages?

Le jeu. 10 févr. 2022 à 14:54, Jon Turney <jon.turney@dronecode.org.uk> a
écrit :

> On 09/02/2022 18:05, Adam Dinwoodie wrote:
> > On Wed, Feb 09, 2022 at 04:12:28PM +0100, Vanda Vodkamilkevich wrote:
> >> On Fri, Feb 4, 2022 at 13:12  AM  marco.atzeri  wrote:
> >>
> >>>> I wouldn't expect most tools to work on special files in /dev. Even
> tar
> >>>> fails on /proc, it would begin to pack your local registry...
> >>>> Make a basic installation on the new system, then sync the rest.
> >>>> An even cleaner way might be to clone your installation via setup,
> using
> >>>> /etc/setup/installed.db - maybe someone has a script for that -
> >>>> and then just sync the /home hierarchy.
> >>>
> >>> script I wrote some time ago for re-installation
> >>>
> >>>
> >>
> https://stackoverflow.com/questions/46829532/cygwin-save-package-selections-for-later-reinstall/
> >>>
> >>>
> >> Just for the record:
> >> I just played with the script provided in stackoverflow which generates
> a
> >> bat file, and it seems that the behaviour of the '-P' switch of setup
> has
> >> changed because now it explicitely needs the version of the package (at
> >> least for me it didn't worked without the version number:  " -P
> >> package=version_as_seen_by_cygcheck") . Can someone (probably Jon
> Turney)
> >> confirm this usage of the '-P' switch (BTW the mandatory '='  is
> explained
> >> nowhere - Nor in 'setup -h' or the setup web pages - and can be seen
> only
> >> in  the source code).
>
> It's not mandatory.  If you're looking at the source code, you should
> see that the case where '=' is not present is also still handled.
>
> Yes, it should be documented, but so should the rest of the format of
> the string which -P accepts...
>
> > I don't think this is correct.  I use the setup program's -P option
> > regularly, including with the latest 2.917 release, and it successfully
> > installs packages.  Indeed, I've just tried running it to install
> > 2048-cli (given it's a package I know I don't have installed) and it
> > successfully installed the package without specifying a version number.
> >
> > Can you give a bit more information about exactly what commands you're
> > running, what you're expecting to happen, and what precisely happens
> > instead?
>
> Yeah, what he said :)
>
> That's not to say that -P isn't picky in the precise format of the
> package list it accepts (that might have unfortunately changed), and the
> error reporting when the package list doesn't meet it's expectations is
> weak, but it works for me, so an instance of a setup invocation which
> fails because it doesn't contain '=' would be very helpful.
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-02-10 14:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 10:09 Switch to a new PC Vanda Vodkamilkevich
2022-02-04 10:26 ` Russell VT
2022-02-04 10:52   ` Thomas Wolff
2022-02-04 12:11     ` marco atzeri
2022-02-09 15:12       ` Vanda Vodkamilkevich
2022-02-09 18:05         ` Adam Dinwoodie
2022-02-10 13:53           ` Jon Turney
2022-02-10 14:41             ` Vanda Vodkamilkevich
2022-02-04 17:15   ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).