[mdlug] Transfering /home with scp

Ein Bielaczyc ebielaczyc at gmail.com
Mon Mar 3 21:52:50 EST 2008


On Mon, Mar 3, 2008 at 1:25 PM, Peter Bart <peter at petertheplumber.net> wrote:
> Hi Everyone,
>         I'm finally at the point of transferring all my files to my new
>  notebook. The old one is a T30 Thinkpad running opensuse 10.3 and the
>  new one is a T61 Thinkpad running opensuse 10.3. Can I simply use scp
>  to copy the entire /home? Or are there files in /home that would be
>  specific to the hardware/operating system it's on?
>       If I do, I know I must use the -r flag to copy
>  directories recursivly, the -p flag to preserve ownership and
>  permissions. What about directories/files that allready exist and
>  should be replaced, such as /home/.evolution? I've read that cp and scp
>  are intentionally similar. The man page for cp lists -f as the flag to
>  be used to replace an existing file if it can't be written to. I don't
>  see the -f/force flag on scp's man page.  I'm somewhat at a loss on how
>  to do that part. Of course I could delete all the files in /home before
>  copying. But I've added programs on the new machine so that seems a
>  little much because I don't want to remove files that won't be replaced
>  and I might need.
>     Would tar be a better, quicker option? ie Create the archive
>  of /home on the old machine,
>  burn
>  it to disc, then unpack it on the new machine? I tried to make an
>  archive of my /home several times but I think I wasn't patient enough
>  or used the wrong command because it either didn't work or was taking
>  several hours. On the other hand it appears that when unpacking an
>  archive it overwrites existing files of the same name in the directory
>  it's unpacked.
>     There is probably another option I don't know about, so please
>  suggest it!
>
>  Best Regards,
>
>  --
>  Peter The Plumber sm on the Road
>  State Licensed Plumber
>  State Certified Backflow Device Tester
>  Factory Trained Boiler Install/Service
>  <http://petertheplumber.net>
>  24h Service 313.215.5175
>
>  Don't sleep with a drip! Call a licensed and experienced plumber.
>  _______________________________________________
>  mdlug mailing list
>  mdlug at mdlug.org
>  http://mdlug.org/mailman/listinfo/mdlug
>

I've had much success using rsync to transfer files. If security is a
concern rsync can employ the use of ssh to transfer data inside a
secure connection. If security is not a concern then I'd also
recommend NFS, as it is fairly easy to setup, and then use rsync to
transfer.

Just FYI, the following would sync "/home" on Old-Machine and New-Machine.

As root on Old-Machine:
       rsync -a -e ssh /home/ root at new-machine:/home/

There are many other options with rsync to control just what is, and
what isn't, transferred.

-- 
Ein Bielaczyc <ebielaczyc at gmail.com>

NOTICE: This E-mail (including attachments) is covered by the
Electronic Communications Privacy Act, 18 U.S.C.2510-2521, is
confidential and may be legally privileged. If you are not the
intended recipient, you are hereby notified that any retention,
dissemination, distribution or copying of this communication is
strictly  prohibited. Please reply to the sender that you have
received the message in error, then delete it.



More information about the mdlug mailing list