Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Copy files from Server to Server over ssh with rsync

stefki

Extended Member
Ext. Member
Joined
Nov 26, 2019
Messages
22
Reaction score
79
Points
24
Location
MKD
Hello all.

I am going to show you powerful linux command to copy large files and directories from server to remote server .

We are going to use rsync command which is more faster than scp and sftp

Lets says we have Directory full of movies on our Server A. Now we want to copy all the movies to remote server somewhere in the world :)

This is how magic is done:

Log in to your Server A over ssh console

if you don't have rsync already installed just do it:

Code:
 apt-get install rsync -y

next command will launch the transfer and will ask you for root password of the remote server.

Code:
 rsync -hrtplu --progress --stats /home/movies/ [email protected]:/home/movies

boom magic is done :)

192.168.2.95 it's my local ip address you should replace it with your own remote server ip address.

Now what about if your server SSH is listening on different port not the 22 default one.

You have to add -e option and full command will looks like this one

Code:
  rsync -hrtplu --progress --stats -e "ssh -p 222" /home/movies/ [email protected]:/home/movies



Best Regards to all :)

enjoy
 
Last edited:
rsync is great but my god, who wants to copy TB’s worth of data. Plus, you should put a throttle on it so your hosts don’t throttle it for you. Have a look at this thread and spare yourself the hassle. Either way, nice post. Put some of it behind THANKS bc you deserve likes for the write up.

 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
Oh, also.... screen is handy when you have many files but don’t want to leave your ssh session open. Run it inside screen, detach it, and go about your day. Log back in later, reattach the screen and check it. ;)
 
You can do it without rsync.

-From source server to dest server:

scp -l 400000 -r /somefolder/sourcefolder/folder root@ip_of_dest_server:/destfolder/folder

Where "-l 400000" is the speed bw limit.
 
screen is the best option before copy the files, it will help a lot.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
Fantastic, works a treat, thank you.
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top