Moving files from one linux server to another using scp [closed]

Posted on

Moving files from one linux server to another using scp [closed] – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, scp, , , .

I want to move some files from one server to another . I want the public_html directory from server 1 to be transferred to server 2 . Can anyone give me the syntax to do so ? rsync keeps crashing my server after some hours . I’m using centos 7 .

Solution :

scp -r <source path> <user_name>@<ip of server_2>:/<destination path>

Ex-

scp -r ./public_html movi@10.1.1.1:/home/movi

You should use SCP when you want to do a one copy. And Rsync if you want to continues sync directories or files.

I’m using the following syntax for syncing over SSH

rsync -ah --delete -e ssh /path/to/source-folder user@server:/path/to/destination-folder

Don’t worry about the –delete flag. That options only deletes files and folders in the destination folder when it doesn’t exists in the source folder

I’m having a hard time thinking that this should cause your servers to crash. Please provide us with your rsync command so that we could look into this issue.

Br
Sanderp

Leave a Reply

Your email address will not be published.