On Sun, 3 Sep 2017, Denis Heidtmann wrote: > I am wanting to copy my home folder from my old machine to my new one. I > was planning on putting either the old or the new drive in a usb dock and > copying everything over using cp -pr. But web comments mention rsync. What > are the risks/rewards of the various choices?
Denis, rsync preserves links, permissions, and everything else. It is the backend to dirvish which is the tool I (and many others) use for daily backups to an external hare drive, and I use it to transfer/synchronize subdirectories between the desktop and the laptops. I use the options -avz (a == archive, v == verbose, z == compress). Read the man page for options you might want to use. One thing to watch carefully is when to use a terminating forward slash (/) and when to leave it off. As the man page tells ue, "Perhaps the best way to explain the syntax is with some examples: rsync -avz foo:src/bar /data/tmp This would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in "archive" mode, which ensures that sym‐ bolic links, devices, attributes, permissions, ownerships, etc. are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer. rsync -avz foo:src/bar/ /data/tmp A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the contain‐ ing directory on the destination." HTH, Rich _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug