Transfer backup files from server to server in command line!

i have been struggling to find some way or another to transfer my file from one linux server to another using commandline. Before this i was just using cpanel to do backups.

Here is an easy way to accomplish transferring backup files from one server to another in linux. Just simple command using SCP (secure file copy)

scp -C -P portnumber local_filename root@your.ip.address:destination_file

Example:
scp -C -P 2929 backups.tar.gz root@IP.ADDRESS:/home/backups/

-C is compression to speed up transfer.
-r is for recursive
-P is your SSH port number (default ssh port 22)
[If you are running SSH other than default port you will need to specify this]

NOTE:
Dont forget that if you are running a firewall (CSF or APF) make sure that your unblock port in your EG_TCP_PORT (outbound TCP port) in your local host.

Similar Posts:

Tags:

Balakrishnan Prabhu

Mr. Balakrishnan Prabhu is the founder of Corpocrat magazine. He is also the founder of Best Citizenships (BC), assisting wealthy individuals with with global citizenship and residency programs in Europe. His other interests are Linux, Machine learning, Wordpress, etc. You can contact him here