Switch to a new PC
Brian Inglis
Brian.Inglis@SystematicSw.ab.ca
Fri Feb 4 17:15:42 GMT 2022
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.]
More information about the Cygwin
mailing list