Copying files over SSH with rsync

Marc Wag­ner

Janu­ary 26, 2022

1 min read|

As a Word­Press agen­cy, we also take over moves of web­sites and Woo­Com­mer­ce stores. This can of cour­se mean seve­ral GB of data that must be moved.

The most effec­ti­ve way to copy data from one sys­tem to ano­ther is via SSH. The pre­re­qui­si­te for this is, of cour­se, that both hos­ting packa­ges offer SSH access.

RSYNC makes it even easier to copy files. The advan­ta­ge of using rsync is that you can deci­de whe­ther files that alre­a­dy exist should be copied again, or whe­ther they can be igno­red.

To copy the data from your local server to a remote server #

To do this, log in via SSH to the ser­ver from which you want to copy the data. Then enter the fol­lo­wing line in the con­so­le:

rysnc -avz /pfad/zum/lokalen/verzeichnis [email protected]:/pfad/zum/remote/verzeichnis

Now the copy­ing of the data starts direct­ly.

To copy the data from a remote server to your local server #

Alter­na­tively, you can down­load the data from an exter­nal ser­ver to your cur­rent ser­ver. To do this, sim­ply enter the fol­lo­wing line in the shell on your ser­ver:

rsync -avz [email protected]:/pfad/zum/remote/verzeichnis /pfad/zum/lokalen/verzeichnis

And the data will be down­loa­ded to your local ser­ver.

If rsync is not the right thing for you, you can look at copy­ing files using SCP as an alter­na­ti­ve.

Was this artic­le hel­pful? How do you copy the data when you make a move? Wri­te us a com­ment. We will be glad to recei­ve your feed­back.

88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

Arti­kel von:

Marc Wag­ner

Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar