-4

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 .

movi ran
  • 1
  • 2
  • 2
  • 3
  • You should edit your question to provide more detail such as the rsync command you used and the output of that command. – Anthony Geoghegan Dec 20 '15 at 12:38
  • Hi using rsync my server crashes . I don't know why but I will investigate this crash issue and let you know if I find something . for know I will check to see if scp works – movi ran Dec 20 '15 at 14:43

2 Answers2

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

Ex-

scp -r ./public_html movi@10.1.1.1:/home/movi
Lakal Malimage
  • 486
  • 1
  • 4
  • 10
0

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

sanderp
  • 74
  • 2