As an Internet agency, we also handle relocations and migrations of websites, portals and applications. In some cases, this can already mean several GB of data.
The most effective way to copy data from one system to another is via SSH. Of course, the prerequisite for this is that both hosting packages offer SSH access.
One way to copy files between two servers is with SCP.
To copy the data from your local server to a remote server #
Log in via SSH to the server from which you want to copy the data.
Then enter the following line in the console:
scp -r /pfad/zum/lokalen/verzeichnis [email protected]:/pfad/zum/remote/verzeichnis
After entering your password, the copying process should already start.
To copy the data from a remote server to your local server #
Log in via SSH to the server where you want to insert the data.
Then enter the following line in the console:
scp -r [email protected]:/pfad/zum/remote/verzeichnis /pfad/zum/lokalen/verzeichnis
After entering your password, the copying process will begin.
Run SCP in the background #
If you don’t want to watch the process permanently, you can move it to the background.
Press CTRL+Z to pause copying. Afterwards you can use bg to restart the process in the background without having to stay there. With exit you can close the terminal.
- CTRL+Z to pause the process
- bg in the terminal to run the process in the background.
- exit to close the terminal.
If SCP is not the right thing for you, you can look at copying files using rsync as an alternative.
Was this article helpful? How do you copy the data when you make a move? Write us a comment. We appreciate your feedback.
Comments