This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I move Cygwin and Cygwin64 to a drive other than C: ?


On 04.04.2015 21:52, Andrey Repin wrote:
> Greetings, Eric Pement!
> 
>> Follow-up question for Corinna or anyone who might know the answer:
> 
>>>> On Apr  1 03:26, Robert Miles wrote:
>>>>>> Can I move the entire Cygwin and Cygwin64 directory trees to one
>>>>>> of the nearly empty drives, without losing the extra packages I've
>>>>>> already downloaded and the files I've created?
>>>>>
>>>>> Robocopy allows to copy an entire Cygwin tree while keeping all
>>>>> permissions intact.  I had good luck with something along the
>>>>> lines of
>>>>>
>>>>>   robocopy C:\cygwin64 D:\cygwin64 /e /purge /z /copyall /sl
>> . . .
>> With an added comment that
>>> I *did* move Cygwin installations using
>>> robocopy and the above works for me.  In an elevated shell.
> 
>> I recently needed to move a Cygwin installation, about 6 GB, to
>> another drive accessible only on a network file system. Due to the
>> number of files, copying everything would have taken a week or more,
>> because everything slows down when the number of files increases.
> 
>> The solution I ultimately took was not the best. I compressed
>> everything into a single *.7z (7-zip) archive, moved the single
>> archive across the network, and uncompressed the *.7z archive on the
>> target machine.
> 
>> Although the total time was much, much faster (maybe 5 or 6 hours,
>> including 30 minutes to uncompress the archive), all my file
>> permissions were set to the same value, regardless of what they had
>> been previously, and any extended attributes were lost entirely.
> 
>> I didn't like it, but I had no realistic alternative.
> 
>> For future resource, what is the best way to archive a Cygwin
>> installation into a single file, which will preserve all file
>> properties and permissions, so that the archive can be transferred to
>> another location? (For the sake of clarity, presume that Cygwin does
>> NOT exist in the target location, so a non-Cygwin tool must be used to
>> expand the archive.)
> 
> About any sane modern archiving tool can read TAR archives.
> And most of them understand gz/xz/bz2 compression.
> You could have used any of that to unpack Cygwin to get a bootstrap
> environment, then use that environment to unpack the tar with all permisisons
> restored.

Agreed. I do this regularly (for a different reason), and all you need is a
small subset of Cygwin that can support tar and gz/bz2/xz/whatever you use to
compress the files. My subset is 21 megabytes when uncompressed; in your case
it can be much smaller, as i also have wget and its dependencies, and i'm
forming that subset automatically by unpacking packages (which means a lot of
unneeded files are installed). You may need to run some kind of chown/chmod
combo after unpacking that subset.

Another interesting scenario is to use icacls to save ACLs of files, then use
it on target machine to restore them.

Also, you can just *install* a minimal set of Cygwin packages on the target
machine normally.



-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org

Attachment: 0x922360B0.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]