Welcome to the Slackware Documentation Project

This is an old revision of the document!

How to copy files \ directories \ filesystems via network.

That small article give a view of content copying task via network.
I want do this on my homeserver upgrade, copy all info from working “old” server, to “new” server partition, for can make access a data and config files, for bring “new” server in state it looks be similar of “old” one, before switch “old” off, and set “new” instead it.
In examples, i work from “new” server CLI, it has IP
“Old” server has IP, both in in one subnet.
Both, “ssh” and “scp” commands work via secure shell ( ssh ) protocol, port 22, and must be enabled “sshd” on computer where we connect.

Files \ single folder copying

If you need a copy of standalone files or folders, you can use an scp util:

scp -r -v -p root@ /From_Old_Server


  • -r key do recursive , copy all data in “/etc” folder and all its subfolders.
  • -p key preserve file attributes, like a creation, modification times.
  • -v gives us verbose output.

In there example we copy “/etc” folder from computer ( actually, “Old” server), to folder “/From_Old_Server” in local computer ( “new” server).

Sadly, but that command ( scp ) cannot copy whole system disk, contains “/proc”, “/dev” and even “/lost+found” catalog, who is it in every mounted extX filesystem partition - at that places “scp” stuck and stops.

Thanks to Patrick, “Volkerdi” gives us workaround for that situation:

Copy whole filesystem


ssh root@ “(cd / ; tar cf - . )” | (mkdir -p /From_Old_Server ; cd /From_Old_Server ; umask 000 ; tar xvf -)

help us transfer full filesystems without stuck and pain from “old” to “new” computer.


* Originally written byJohn Ciemgals 2013/02/10 03:51
* With help from Patrick Volkerding

In Other Languages
Translations of this page?:
QR Code
QR Code howtos:general_admin:files_filesystem_copying_over_network (generated for current page)